lkml.org 
[lkml]   [2009]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] TOMOYO: Add garbage collector support. (v2)
From
Date
Hello.

Paul E. McKenney wrote:
> The list_del_rcu() primitive is designed for removing elements from
> lists that have concurrent readers, and it therefore avoids changing the
> ->next pointer. That said, I don't immediately see whether or not there
> is some other reason you need to keep it on the list. And do you need
> the ->prev pointer to stay valid? If not, you might be able to use it
> in place of the ->is_deleted flag.

I don't need ->prev pointer.

> > Use of RCU does not help here because we need to keep the item valid as long as
> > the item is referred by ->read_var1 or ->read_var2 or ->write_var1 .
>
> You would indeed need some way of tracking those references. One
> approach is to make the RCU callback check to see if any of them
> reference the to-be-deleted object, reposting itself if so. This
> approach assumes that such a reference is short-lived, of course.
>
> If the ->read_var1 and other references are long-lived, could you
> post an RCU callback when the last such reference was removed?

The reference stored in ->read_var1 / ->read_var2 / ->write_var1 are long-lived
(it varies from less than one second to more than many hours).

Well, it's time for me to read all Documentation/RCU/* .

Thanks.


\
 
 \ /
  Last update: 2009-05-27 03:29    [W:0.159 / U:1.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site