Messages in this thread | | | Date | Tue, 31 May 2022 14:50:31 +0200 | Subject | Re: [PATCH v4 1/4] mm: reduce the rcu lock duration | From | David Hildenbrand <> |
| |
On 30.05.22 13:30, Miaohe Lin wrote: > Commit 3268c63eded4 ("mm: fix move/migrate_pages() race on task struct") > extends the period of the rcu_read_lock until after the permissions checks > are done to prevent the task pointed to from changing from under us. But > the task_struct refcount is also taken at that time, the reference to task > is guaranteed to be stable. So it's unnecessary to extend the period of > the rcu_read_lock. Release the rcu lock after task refcount is successfully > grabbed to reduce the rcu holding time. > > Reviewed-by: Muchun Song <songmuchun@bytedance.com> > Reviewed-by: Christoph Hellwig <hch@lst.de> > Reviewed-by: Oscar Salvador <osalvador@suse.de> > Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> > Cc: Huang Ying <ying.huang@intel.com> > Cc: David Howells <dhowells@redhat.com> > Cc: Christoph Lameter <cl@linux.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
-- Thanks,
David / dhildenb
| |