[lkml]   [2004]   [Oct]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [RFC][PATCH] TTY flip buffer SMP changes
    On Thu, Oct 07, 2004 at 08:37:12PM +0100, Alan Cox wrote:
    > Now that networking is not a kernel option it seems slightly dumb that
    > the tty layer doesn't just use the sk_buff model (probably not code).
    > kmalloc is very fast and it kills TTY_DONT_FLIP because every buffer is
    > owned by _one_ person at a time. (sk_buff's dont direclty fit too well
    > because we push both error and bits per byte and don't last time I
    > checked support recycling).

    Suggestion: use two skbuff's for the data bytes and the error flags,
    and make the error skbufs be optional --- sometimes the line discpline
    won't care about the error bytes at all (example: raw mode).

    Even if kmalloc() isn't as fast using two ring buffers which we flip
    back and forth, CPU's have gotten a lot faster since when I
    implemented the flip buffers some 12 years ago (i.e., 8 Moore law's
    doublings ago). If you nuke flip buffers, I'm not going to take it
    personally. :-)

    > Another nice effect is simplifying the ldisc and driver level locking.
    > Drivers queue buffers, ldiscs eat buffers. If the driver queues a buffer
    > and there is temporarily no ldisc it does not get lost.


    - Ted
    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 14:06    [W:0.024 / U:153.276 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site