lkml.org 
[lkml]   [2006]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH] Avoid calling down_read and down_write during startup
    Benjamin LaHaise <bcrl@kvack.org> wrote:
    >
    > On Thu, Feb 23, 2006 at 05:36:56PM -0500, Alan Stern wrote:
    > > This patch (as660) changes the registration and unregistration routines
    > > for blocking notifier chains. During system startup, when task switching
    > > is illegal, the routines will avoid calling down_write().
    >
    > Why is that necessary? The down_write() will immediately succeed as no
    > other process can possibly be holding the lock when the system is booting,
    > so the special casing doesn't fix anything.

    down_write() unconditionally (and reasonably) does local_irq_enable() in
    the uncontended case. And enabling local interrupts early in boot can
    cause crashes.
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-02-24 01:19    [W:2.287 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site