Re: btrfs_tree_lock trylock

2008-09-08 Thread Andi Kleen
On Mon, Sep 08, 2008 at 10:02:30AM -0400, Chris Mason wrote: On Mon, 2008-09-08 at 15:54 +0200, Andi Kleen wrote: The idea is to try to spin for a bit to avoid scheduling away, which is especially important for the high levels. Most holders of the mutex let it go very quickly. Ok

Re: btrfs_tree_lock trylock

2008-09-08 Thread Chris Mason
On Mon, 2008-09-08 at 12:13 -0400, jim owens wrote: Chris Mason wrote: My guess is that the improvement happens mostly from the first couple of tries, not from repeated spinning. And since it is a mutex, you could even do: I started with lower spin counts, I really didn't want to spin

Re: btrfs_tree_lock trylock

2008-09-08 Thread Stephen Hemminger
On Mon, 08 Sep 2008 12:20:32 -0400 Chris Mason [EMAIL PROTECTED] wrote: On Mon, 2008-09-08 at 12:13 -0400, jim owens wrote: Chris Mason wrote: My guess is that the improvement happens mostly from the first couple of tries, not from repeated spinning. And since it is a mutex, you

Re: btrfs_tree_lock trylock

2008-09-08 Thread Christoph Hellwig
On Mon, Sep 08, 2008 at 09:49:42AM -0700, Stephen Hemminger wrote: Not to mention the problem that developers seem to have faster machines than average user, but slower than the enterprise and future generation CPU's. So any tuning value seems to get out of date fast. So where do my fellow