LWN.net Logo

Btrfs aims for the mainline

Btrfs aims for the mainline

Posted Jan 7, 2009 20:36 UTC (Wed) by jwb (guest, #15467)
Parent article: Btrfs aims for the mainline

I'd like to hear how this lock-spinning loop behaves on a system with 1024 CPUs. I'm sure it's swell on a dual-core, shared-cache, UMA machine but it sounds like it could practically grind to a halt on a many-way NUMA machine.


(Log in to post comments)

Btrfs aims for the mainline

Posted Jan 7, 2009 21:41 UTC (Wed) by martinfick (subscriber, #4455) [Link]

Wouldn't it make spinning more worthwhile the more CPUs you have running? The more other CPUs running, the more likely the lock will be released sooner than later, making the spinning instead of sleeping more likely to pay off, right?

Btrfs aims for the mainline

Posted Jan 7, 2009 23:32 UTC (Wed) by jzbiciak (✭ supporter ✭, #5246) [Link]

I don't know that it'd cause things to grind to a halt on a NUMA under normal circumstances. The cost of migrating lines goes up, sure, but you only get extra traffic when the busywaiter arrives just ahead of a lock-release.

I'm sure it could cause some interesting thundering-herd behavior, though, if there are a lot of people waiting on the lock to release though. If a large number of CPUs are in the busywaiting loop when the lock releases, things get really fun I suppose.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds