[lkml]   [2007]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 00/13] Syslets, "Threadlets", generic AIO support, v3

    > It is not a TUX anymore - you had 1024 threads, and all of them will be
    > consumed by tcp_sendmsg() for slow clients - rescheduling will kill a
    > machine.

    I think it's time to make a split in what "context switch" or
    "reschedule" means...

    there are two types of context switch:

    1) To a different process. This means teardown of the TLB, going to a
    new MMU state, saving FPU state etc etc etc. This is obviously quite

    2) To a thread of the same process. No TLB flush no new MMU state,
    effectively all it does is getting a new task struct on the kernel side,
    and a new ESP/EIP pair on the userspace side. If there is FPU code
    involved that gets saved as well.

    Number 1 is very expensive and that is what is really worrying normally;
    number 2 is a LOT lighter weight, and while Linux is a bit heavy there,
    it can be made lighter... there's no fundamental reason for it to be
    really expensive.

    if you want to mail me at work (you don't), use arjan (at)
    Test the interaction between Linux and your BIOS via

    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: 2007-02-22 12:55    [W:0.019 / U:230.804 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site