Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, 7 Jan 2009, Gregory Haskins wrote:
>
> Can I ask a simple question in light of all this discussion? 
> 
> "Is get_task_struct() really that bad?"

Yes. It's an atomic access (two, in fact, since you need to release it 
too), which is a huge deal if we're talking about a timing-critical 
section of code.

And this is timing-critical, or we wouldn't even care - even in the 
contention case. Admittedly btrfs apparently makes it more so that it 
_should_ be, but Peter had some timings that happened with just regular 
create/unlink that showed a big difference.

So the whole and only point of spinning mutexes is to get rid of the 
scheduler overhead, but to also not replace it with some other thing ;)

			Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux