lkml.org 
[lkml]   [2008]   [Aug]   [12]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateTue, 12 Aug 2008 12:57:11 +0900
FromHisashi Hifumi <>
SubjectRe: [patch 12/17] vfs: pagecache usage optimization for pagesize!=blocksize
Hi Nick.

>
>This patch unfortunately appears like it may introduce an
>uninitialized memory leak due to a data race between one
>thread initializing a buffer then marking it uptodate, and
>the other testing buffer uptodate then reading from the
>buffer (buffer, read as: page memory covered by buffer head).
>
>For reference, this is basically the same class of data race
>that I fixed 0ed361dec36945f3116ee1338638ada9a8920905

I think the same issue that your patch 0ed361dec36945f3116ee
1338638ada9a8920905 "fix PageUptodate data race" pointed out 
is there around buffer_head without my patch "vfs: pagecache usage 
optimization for pagesize!=blocksize".
Because set_buffer_uptodate or buffer_uptodate are used without
distinct locking facility (lock_buffer, or lock_page) in many places,
so it would be needed to deal with memory ordering issue.

Do you add wmb/rmb to BUFFER_FNS macros?


>
>I don't think this patch got quite enough justification to
>warrant just blindly putting barriers in the buffer bitops.
>The best-case numbers for it were reasonable enough when the
>downside was only an extra branch or two in a relatively slow
>path. I don't really know how best to go from here (maybe
>someone can argue it is not a problem or come up with a better
>fix?).
>
>Thanks,
>Nick



\
 
 \ /
  Last update: 2008-08-12 07:39    [from the cache]
©2003-2008