In a large skillet or sauté pan, heat 3 tbsp oil over medium-high heat. Add the onions, and sauté until dark brown. Stir them every couple of minutes to keep from burning (and scrape the pan with a flat spatula as you do so). You want them to get really dark and caramelized. This should take at least 20 minutes, maybe more. Remove from pan and let cool on a plate or bowl.
Using the same pan, and without cleaning it, add 3 more tbsp oil and keep on medium-high heat. Add the sliced mushrooms. Sauté until they soften and release their juices, then continue to cook until very browned, about 5 more minutes. Remove from pan and let cool.
Add the onions, the mushrooms, and all the remaining ingredients to a food processor (or blender). Pulse a few times, then scrape down the side of the bowl. Run the processor some more, scraping the mixture down again, and keep repeating this until it's all well-blended and the walnuts are pulverized into the mix (if you see walnut pieces, keep going). Don't overdo it, though, or it'll turn into a paste.
You can serve immediately (with matzo, or crackers), but it's actually even better when it has a chance to sit (refrigerated) for a few hours or overnight. Leftovers will keep, covered, in the fridge for about a week.