lkml.org 
[lkml]   [2011]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 3/3] kref: Remove the memory barriers
From
Date
On Mon, 2011-12-12 at 23:56 +0100, Oliver Neukum wrote:
> I guess I worried not about the increment, but the decrement.
> Which makes me wonder what happens if you don't intend
> to get the kref again, but need to make sure it is usually freed,
> like:
>
> CPU A CPU B
>
> kref_get(p)
> start_io(p)
> [interrupt from IO]
> kref_put(p)

I would expect that if something was needed here, the io stack would
provide the barriers since the io completion will probably want to
change state set by the start_io thing.

Anyway, I would put this squarely outside the responsibility of kref.


\
 
 \ /
  Last update: 2011-12-13 10:15    [W:0.143 / U:1.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site