Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp3262564pxa; Tue, 25 Aug 2020 16:34:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxSX7HaTr9xI/gjAFtkTpyNAcApVMfx6xZiYi1diw/hnMMTTfCnZAZeN90GAnLo0APybMCe X-Received: by 2002:aa7:d6d6:: with SMTP id x22mr13180138edr.282.1598398474867; Tue, 25 Aug 2020 16:34:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598398474; cv=none; d=google.com; s=arc-20160816; b=RsxLpMDVIbxGc3dYzPIq68yto8VWCaA0FHXJxNfJVFQZ+c9/itWK4phClC9A/tkUEn 8tihQ3wsaVW1FuGhZRVBgcCWd3Nv8kQ4/pwRyQB0s6BBW+6PKrBupO7lI9PblqPkeURO G/YLfv9ejJe5DRvrVNZUqhApGVTlxxjATRsiYNdlE0pCwxutU0ssEdkMP75oF+1vSoiv DP9LJjjhLfAZWtKsmnqq7NT4WNeYzIHSCbrb0sweErT1gNUnqbgMaJV5mrRmb1EuXMU7 dV0FUVO4faYDuNEo5xDoWVfC3Jd2AvJB71i3s1S44eHFkfKK5AlHsdrVj3wfvMAYbS/I Xjcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:organization:references:cc:to:from:subject :dkim-signature; bh=iNZwRJs0PD9iKsaLBqotm4UwZlEiqVWYFVG+uF+ypPo=; b=W9Y77Ig+4ex5d3emElITQCmCcIuSbQZDctnC2feEAtaLI+xpsV9RHF1hWnaC2ENaXl IzdLQ+T2ssw6sT3i2MMztSgU9r/ghLAR7fqSl6wvf8kimiPqdqRtpgN91WP8Fa0cmixk y9sDqNBzsx+ewd+vUoCbogUEvJj1U+V825kOgUmj8rwKLeatcIlGF7zcUYOnpSnps6w+ WKOqxz24JwKQs/36iLtMT3sgX48d6gQ5dCXu6AoWr8p/aL/ur+c8jBOMtlfm+xrX6wyv Tbe1xZ3oCo9ROkpV1uAoDa+vlb0Qqzj9yZT6sjzFeDNAc4nWi6PGFFuXsCbnDXBfzY6L fJag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aCptvD7R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q17si251307edr.257.2020.08.25.16.34.12; Tue, 25 Aug 2020 16:34:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=aCptvD7R; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726786AbgHYXct (ORCPT + 99 others); Tue, 25 Aug 2020 19:32:49 -0400 Received: from us-smtp-delivery-1.mimecast.com ([205.139.110.120]:23403 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726672AbgHYXcs (ORCPT ); Tue, 25 Aug 2020 19:32:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598398367; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=iNZwRJs0PD9iKsaLBqotm4UwZlEiqVWYFVG+uF+ypPo=; b=aCptvD7RnRLZc5E7/MoBHRbfmS/7zcuAikd6vdEeIgJtTpjbvFTKnT+g6v4v6R1GKwbR21 u+yX65AwlmvVLPoCKZNNI5YZ2q/5h+9hbQdw8XMEKLNRYfXS+MYeUdi4M82ufct0+Zzc2+ jrUA/MaRhXJtjt3pOVZI6P2ddIIjxdo= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-382-nQGTg9oSMM-q7GISHw33yQ-1; Tue, 25 Aug 2020 19:32:43 -0400 X-MC-Unique: nQGTg9oSMM-q7GISHw33yQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 279CA805EE2; Tue, 25 Aug 2020 23:32:42 +0000 (UTC) Received: from llong.remote.csb (ovpn-112-124.rdu2.redhat.com [10.10.112.124]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2E0271002396; Tue, 25 Aug 2020 23:32:41 +0000 (UTC) Subject: =?UTF-8?B?UmU6IOWbnuWkjTogW1BBVENIXSBkZWJ1Z29iamVjdHM6IGluc3RhbGwg?= =?UTF-8?Q?cpu_hotplug_callback?= From: Waiman Long To: "Zhang, Qiang" , "tglx@linutronix.de" , "elver@google.com" Cc: "linux-kernel@vger.kernel.org" , "akpm@linux-foundation.org" References: <20200820032453.5222-1-qiang.zhang@windriver.com> Organization: Red Hat Message-ID: Date: Tue, 25 Aug 2020 19:32:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=gbk; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/25/20 6:26 PM, Waiman Long wrote: > On 8/25/20 12:53 AM, Zhang, Qiang wrote: >> ________________________________________ >> ??????: linux-kernel-owner@vger.kernel.org >> ???? 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 >> >> 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? Or if you can make the to-be-offlined cpu free the debugobjs before it is offlined. That will work too. Cheers, Longman