[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a0421769-c2b9-d59a-0358-3cc84b2cb2bd@bytedance.com>
Date: Wed, 12 Oct 2022 19:22:21 +0800
From: Zhongkun He <hezhongkun.hzk@...edance.com>
To: Michal Hocko <mhocko@...e.com>
Cc: corbet@....net, akpm@...ux-foundation.org, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, linux-api@...r.kernel.org,
linux-doc@...r.kernel.org, wuyun.abel@...edance.com
Subject: Re: [External] Re: [RFC] mm: add new syscall pidfd_set_mempolicy()
>
> Yes, this will require some refactoring and one potential way is to make
> mpol ref counting unconditional. The conditional ref. counting has
> already caused issues in the past and the code is rather hard to follow
> anyway. I am not really sure this optimization is worth it.
>
> Another option would be to block the pidfd side of things on completion
> which would wake it up from the task_work context but I would rather
> explore the ref counting approach first and only if this is proven to be
> too expensive to go with hacks like this.
Hi Michal
The counting approach means executing mpol_get/put() when start/finish
using mempolicy,right? With the addition of lock add/dec on the hot
path, the performance may be degraded.
I'll try it to see its performance impact in detail.
Thanks.
Powered by blists - more mailing lists