[lkml]   [2001]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH for 2.5] preemptible kernel
    On Tue, 20 Mar 2001, Keith Owens wrote:
    > The preemption patch only allows preemption from interrupt and only for
    > a single level of preemption. That coexists quite happily with
    > synchronize_kernel() which runs in user context. Just count user
    > context schedules (preempt_count == 0), not preemptive schedules.

    I'm not sure what you mean by "only for a single level of preemption."
    It's possible for a preempting process to be preempted itself by a
    higher priority process, and for that process to be preempted by an even
    higher priority one, limited only by the number of processes waiting for
    interrupt handlers to make them runnable. This isn't very likely in
    practice (kernel preemptions tend to be rare compared to normal calls to
    schedule()), but it could happen in theory.

    If you're looking at preempt_schedule(), note the call to ctx_sw_off()
    only increments current->preempt_count for the preempted task - the
    higher priority preempting task that is about to be scheduled will have
    a preempt_count of 0.

    Nigel Gamble
    Mountain View, CA, USA.

    MontaVista Software

    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:29    [W:0.022 / U:1.144 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site