What the surge did, besides ending all talk of a "civil war," was to get some of the western tribes and the Anbar region to come down clearly on our side. No small feat that. But there are many paths to victory. I could have envisioned a more backboned congress sticking to the original Bush plan, and while it would have cost us more troops, in the long run it also would have sucked in far more jihadists from all over the region---guys we will still have to kill. But no telling. Perhaps now we will kill them under better circumstances. It's also possible that a lot of the flare-up in Afghanistan is the result of post-surge terrorists giving up on Iraq and going back to the original front.
FWIW, I believe we won Iraq in Haditha and Hamdania.
“...it also would have sucked in far more jihadists from all over the region-—guys we will still have to kill.”
Some bad guys just need to be killed.
In the discussion of which hindsight is actually 20/20, there are some arguments that I find compelling. For example: the attack vector from North would result in plenty of Sunni fighters killed. Because Turkey blocked it, they lived to fight another day. Also, the surge coincided with Sunni getting fed up with atrocities committed by Al-Qaida. Its possible that without this disillusionment, there would be no awakening. Another one: we allowed mosques to be used as safe haven for our enemies. In the balance of strong horse/winning the hearts equation, would our no nonsense approach of killing the enemy wherever it is, mosque or not - would it tilt the balance to our favor sooner?
In regards of Afghanistan: it looks like a neighboring country support is weaker now in Iraq, where Iraqi Shiites are less trusting of Persian coreligionists, while there is no border restrictions exist for Taliban and their supporters in Pakistan.