Advertisement Managed Dedicated Servers - HC Servers Dedicated and managed servers in U.S and Europe. Famous 24x7 support and customizations from HCServers.net!
Sponsored link Serve your customers, not your servers, with VERIO Linux VPS. Full-access test-drive here. |
Atomic context and kernel API designAtomic context and kernel API designPosted Mar 25, 2008 23:54 UTC (Tue) by im14u2c (subscriber, #5246)In reply to: Atomic context and kernel API design by jd Parent article: Atomic context and kernel API design
If you follow Andrew Morton's reasoning, "am I in atomic" is something a caller should never ask. It should be told explicitly, as in the case of kmalloc(). The case where "in_atomic" is getting used "legitimately" is in a fault handler (which should not be a fastpath pretty much by definition). It sounds like they're abusing preempt_count to coax a particular behavior out of the fault handler, rather than just stating the intended behavior directly. That doesn't necessarily sound like clean design to me, but rather an overly clever hack. I'm sure someone more familiar with this mechanism can explain why it is or is not a good mechanism.
(Log in to post comments)
|
Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.