lkml.org 
[lkml]   [2019]   [Apr]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: linux-next: build failure after merge of the drm-misc tree
On Tue, Apr 2, 2019 at 7:26 PM Matthew Wilcox <willy@infradead.org> wrote:
>
> On Tue, Apr 02, 2019 at 01:55:03PM +0800, Qiang Yu wrote:
> > Thanks, patch is:
> > Reviewed-by: Qiang Yu <yuq825@gmail.com>
>
> This looks like a fairly naive conversion from the old IDR API to the
> XArray API. You should be able to remove mgr->lock entirely, relying on
> the xa_lock for synchronising free and get.

I'm afraid the a little complex free path may involve some might sleep
functions so use a mutex lock instead of spinlock.

> If you think it's worth it,
> you could even use kfree_rcu() to free the ctx and kref_get_unless_zero()
> and then your get path would be lock-free.

I can take a look this way, thanks.

\
 
 \ /
  Last update: 2019-04-02 15:57    [W:0.075 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site