[lkml]   [2003]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    Patch in this message
    SubjectRe: [PATCH 1/5] 2.6.0 fix preempt ctx switch accounting
    * Nick Piggin <> wrote:

    > Make sure to count kernel preemption as a context switch. A short cut
    > has been preventing it.

    i'd prefer the much simpler patch below. This also keeps the kernel
    preemption logic isolated instead of mixing it into the normal path.


    --- linux/kernel/sched.c.orig
    +++ linux/kernel/sched.c
    @@ -1520,8 +1520,10 @@ need_resched:
    * if entering off of a kernel preemption go straight
    * to picking the next task.
    - if (unlikely(preempt_count() & PREEMPT_ACTIVE))
    + if (unlikely(preempt_count() & PREEMPT_ACTIVE)) {
    + prev->nivcsw++;
    goto pick_next_task;
    + }

    switch (prev->state) {
    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:59    [W:0.020 / U:30.472 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site