lkml.org 
[lkml]   [2007]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [patch] convert aio event reap to use atomic-op instead of spin_lock
    On 4/12/07, Ken Chen <kenchen@google.com> wrote:
    > On 4/12/07, Jeff Moyer <jmoyer@redhat.com> wrote:
    > > I didn't see any response to Zach's request for code that actually
    > > tests out the shared ring buffer. Do you have such code?
    >
    > Yes, I do. I was stress testing the code since last night. After 20+
    > hours of stress run with fio and aio-stress, now I'm posting it with
    > confidence.
    >
    > I modified libaio's io_getevents to take advantage of new user level
    > reap function. The feature is exported out via ring->compat_features.
    > btw, is compat_feature suppose to be a version number or a bit mask?
    > I think bitmask make more sense and more flexible.

    Additional patch on the kernel side to export the new features. On
    top of patch posted at:
    http://marc.info/?l=linux-kernel&m=117636401818057&w=2

    --- a/include/linux/aio.h
    +++ b/include/linux/aio.h
    @@ -138,8 +138,11 @@ #define init_sync_kiocb(x, filp) \
    init_wait((&(x)->ki_wait)); \
    } while (0)

    +#define AIO_RING_BASE 1
    +#define AIO_RING_USER_REAP 2
    +
    #define AIO_RING_MAGIC 0xa10a10a1
    -#define AIO_RING_COMPAT_FEATURES 1
    +#define AIO_RING_COMPAT_FEATURES (AIO_RING_BASE | AIO_RING_USER_REAP)
    #define AIO_RING_INCOMPAT_FEATURES 0
    struct aio_ring {
    unsigned id; /* kernel internal index number */
    -
    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: 2007-04-13 03:11    [W:0.023 / U:30.744 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site