[lkml]   [2010]   [May]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 02/10] rwsem: fully separate code pathes to wake writers vs readers
Michel Lespinasse <> wrote:

> + readers_only:
> + if (!downgrading) {
> +

There's an unnecessary blank line here.

> + /* if we came through an up_xxxx() call, we only only wake
> + * someone up if we can transition the active part of the
> + * count from 0 -> 1
> + */
> + try_again_read:

I hate code that jumps into braced blocks with goto. Would it be possible for
you to do:

if (downgrading)
goto wake_readers;
/* Grant an infinite number of read locks to the readers at the front

instead, please?

Also, since the labels 'undo' and 'try_again' are now specific to the writer
path, can you label them 'undo_write' and 'try_again_write' just to make it

Other than that, no particular objections to this patch.


 \ /
  Last update: 2010-05-19 14:07    [W:0.190 / U:10.868 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site