lkml.org 
[lkml]   [2012]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/9] blkcg: drop unnecessary RCU locking
    On Fri, Feb 17, 2012 at 01:08:00PM -0500, Vivek Goyal wrote:
    > > Modifying blkgs require both blkcg and queue locks,
    > > so read access can be done holding any lock.
    >
    > This is the point I am not getting. How blkg_lookup() is safe just
    > under queue lock. What stops freeing up blkg associated with other
    > queues. I thought caller needs to hold rcu_read_lock() also to
    > make sure it can safely compare blkg->q == q and return the blkg
    > belonging to the queue in question.

    Ooh, you're right. I got confused. We should be holding either blkcg
    lock or rcu_read_lock() across blkg_lookup(). Will update.

    Thanks.

    --
    tejun


    \
     
     \ /
      Last update: 2012-02-17 19:19    [W:2.795 / U:0.156 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site