lkml.org 
[lkml]   [2020]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: 回复: [PATCH] debugobjects: install cpu hotplug callback
From
Date
On 8/25/20 12:53 AM, Zhang, Qiang wrote:
> ________________________________________
> 发件人: linux-kernel-owner@vger.kernel.org <linux-kernel-owner@vger.kernel.org> 代表 qiang.zhang@windriver.com <qiang.zhang@windriver.com>
> 发送时间: 2020年8月20日 11:24
> 收件人: tglx@linutronix.de; elver@google.com; longman@redhat.com
> 抄送: linux-kernel@vger.kernel.org
> 主题: [PATCH] debugobjects: install cpu hotplug callback
>
> From: Zqiang <qiang.zhang@windriver.com>
>
> When a cpu going offline, we should free objects in "percpu_obj_pool"
> free_objs list which corresponding to this cpu.

The percpu free object pool is supposed to be accessed only by that
particular cpu without any lock. Trying to access it from another cpu
can cause a race condition unless one can make sure that the offline cpu
won't become online in the mean time. There shouldn't be too many free
objects in the percpu pool. Is it worth the effort to free them?

Cheers,
Longman

\
 
 \ /
  Last update: 2020-08-26 00:27    [W:0.070 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site