lkml.org 
[lkml]   [2007]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [1/1] Block device throttling [Re: Distributed storage.]
    Date
    Say Evgeniy, something I was curious about but forgot to ask you 
    earlier...

    On Wednesday 08 August 2007 03:17, Evgeniy Polyakov wrote:
    > ...All oerations are not atomic, since we do not care about precise
    > number of bios, but a fact, that we are close or close enough to the
    > limit.
    > ... in bio->endio
    > + q->bio_queued--;

    In your proposed patch, what prevents the race:

    cpu1 cpu2

    read q->bio_queued
    q->bio_queued--
    write q->bio_queued - 1
    Whoops! We leaked a throttle count.

    Regards,

    Daniel
    -
    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-08-28 00:03    [W:4.213 / U:0.028 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site