Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp335670ybl; Mon, 2 Dec 2019 11:29:17 -0800 (PST) X-Google-Smtp-Source: APXvYqyEwXlLTF0Dn4uZfOHB6RaAc2Qta2XXLUjlK7RsiPhhMBtnNighYd7t8bC87iIVia/VfK1Y X-Received: by 2002:aa7:dc48:: with SMTP id g8mr619858edu.208.1575314956938; Mon, 02 Dec 2019 11:29:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575314956; cv=none; d=google.com; s=arc-20160816; b=DVJyXQQMrMthW6zmhqkruRvTgE6nbsGgDFt3yQAQO0VhqQQS3Y1ZaSsKx0JeUsU1Oj 5MOGd5ctOdobGDHKDLftcnRnki2coFvy4Oi80m3PfoeIiQonSDnI7fo8b0b6ZLYBYzJZ NkPsmRwL3GIlaUzqYpN0yqXZiCIkfKEsQutjSJGcLKEX7caLLCApg9Ir6GNEpvuokiPh eJeLmSls80oKmwj/KVjbC5pQT/o+9d7k0kSvZD5L3O05jC/g3PhQPlg+7xMCblaH5O0+ NElCAfFtR+4Ab2QaevMHSFKnpvWfAMyfXKmPjtpUI/QzRlwerAdyaAaGyceoSZJ08lDJ /o6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date; bh=sRC578IzxYpnWQw6x6fP98N8MlOa2CYbZCkgjfiYCog=; b=En2pHlO4fLWYL9z27oqzSJr+7W3JyMuGypHvI1YzpN/L70woURCZjF7nPCDEtgz7CK t3dEFsibkdI2vVr8J5HU+6T37n8X7q5cFW+eQfJ2xlz3GEA8GSVDx7OH+83BOVaCsK4y ZvPybEzWDrc0/W8GIhEaiMYImSowlDGIClgE9RWRl4s2wjM2KguZjLTQ2lUrfS8/CBrh IKMQMTJYT0ry6XGaQADyMjfi6kkBsvq3VAH5pHJTvVLk5zKeVN82+/NkRpVxZdMecx8/ 9etybBd3iuzse4oRWUfPEeBKKql6fI2LXG1CHmp967yYVcbsYIIDK61y+KkXIc9jVufA yV9Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e9si294847ejx.67.2019.12.02.11.28.48; Mon, 02 Dec 2019 11:29:16 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728044AbfLBT0r (ORCPT + 99 others); Mon, 2 Dec 2019 14:26:47 -0500 Received: from mail-qv1-f67.google.com ([209.85.219.67]:46166 "EHLO mail-qv1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727686AbfLBT0r (ORCPT ); Mon, 2 Dec 2019 14:26:47 -0500 Received: by mail-qv1-f67.google.com with SMTP id t9so317184qvh.13 for ; Mon, 02 Dec 2019 11:26:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=sRC578IzxYpnWQw6x6fP98N8MlOa2CYbZCkgjfiYCog=; b=OU4xEpz+6oFHsp0qcnkq8VuIDLX/oFC2rU5BuXlmOTv+ZuVUZte9fp9caANExUPOWd GiM3zVjUSkhN0wmxodnKg3dL+pQkBmGZGctO9m/lxnJ9JPh6AlTlRbZOlJAovnoxQPId hg/o1Ih1ntO05Jl9ppQjm5VM2qraflAK2HMzixPg0ispbJobcXfIc0sPFHLVFpyPIIKh DLr2kgnfENnI2cmu/TKclK8mmi1d5IyZMTumFkgDkCfzKHID7K+naWkOtZc2S8qd54Te 4j31+QweNeAl80Vsxp3LjseJbyUaEQOO9tb1kiUj6kOOuFz3FqcZfJXzKaGKVepEACeT ILgw== X-Gm-Message-State: APjAAAXwXUicvlg2tw16hdl35d159UhHYU+Bi5a5mESZDekg1FjzXsyk 639CENLCDUQGjxpJBob/FI0= X-Received: by 2002:a05:6214:5ac:: with SMTP id by12mr758100qvb.74.1575314806019; Mon, 02 Dec 2019 11:26:46 -0800 (PST) Received: from dennisz-mbp ([2620:10d:c091:500::3:2086]) by smtp.gmail.com with ESMTPSA id u24sm307708qkm.40.2019.12.02.11.26.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Dec 2019 11:26:45 -0800 (PST) Date: Mon, 2 Dec 2019 14:26:43 -0500 From: Dennis Zhou To: Linus Torvalds Cc: Tejun Heo , Christoph Lameter , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [GIT PULL] percpu changes for v5.5-rc1 Message-ID: <20191202192643.GA19946@dennisz-mbp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.12.2 (2019-09-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Linus, This pull request has a change to fix percpu-refcount for RT kernels because rcu-sched disables preemption and the refcount release callback might acquire a spinlock. In the works is to add memcg counting for percpu by Roman Gushchin. That may land in either for-5.6 or for-5.7. There is also some sparse warnings that we're sorting out now. Thanks, Dennis The following changes since commit 4f5cafb5cb8471e54afdc9054d973535614f7675: Linux 5.4-rc3 (2019-10-13 16:37:36 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-5.5 for you to fetch changes up to ba30e27405afa0b13b79532a345977b3e58ad501: Revert "percpu: add __percpu to SHIFT_PERCPU_PTR" (2019-11-25 14:28:04 -0800) ---------------------------------------------------------------- Ben Dooks (1): percpu: add __percpu to SHIFT_PERCPU_PTR Dennis Zhou (1): Revert "percpu: add __percpu to SHIFT_PERCPU_PTR" Sebastian Andrzej Siewior (1): percpu-refcount: Use normal instead of RCU-sched" include/linux/percpu-refcount.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/linux/percpu-refcount.h b/include/linux/percpu-refcount.h index 7aef0abc194a..390031e816dc 100644 --- a/include/linux/percpu-refcount.h +++ b/include/linux/percpu-refcount.h @@ -186,14 +186,14 @@ static inline void percpu_ref_get_many(struct percpu_ref *ref, unsigned long nr) { unsigned long __percpu *percpu_count; - rcu_read_lock_sched(); + rcu_read_lock(); if (__ref_is_percpu(ref, &percpu_count)) this_cpu_add(*percpu_count, nr); else atomic_long_add(nr, &ref->count); - rcu_read_unlock_sched(); + rcu_read_unlock(); } /** @@ -223,7 +223,7 @@ static inline bool percpu_ref_tryget(struct percpu_ref *ref) unsigned long __percpu *percpu_count; bool ret; - rcu_read_lock_sched(); + rcu_read_lock(); if (__ref_is_percpu(ref, &percpu_count)) { this_cpu_inc(*percpu_count); @@ -232,7 +232,7 @@ static inline bool percpu_ref_tryget(struct percpu_ref *ref) ret = atomic_long_inc_not_zero(&ref->count); } - rcu_read_unlock_sched(); + rcu_read_unlock(); return ret; } @@ -257,7 +257,7 @@ static inline bool percpu_ref_tryget_live(struct percpu_ref *ref) unsigned long __percpu *percpu_count; bool ret = false; - rcu_read_lock_sched(); + rcu_read_lock(); if (__ref_is_percpu(ref, &percpu_count)) { this_cpu_inc(*percpu_count); @@ -266,7 +266,7 @@ static inline bool percpu_ref_tryget_live(struct percpu_ref *ref) ret = atomic_long_inc_not_zero(&ref->count); } - rcu_read_unlock_sched(); + rcu_read_unlock(); return ret; } @@ -285,14 +285,14 @@ static inline void percpu_ref_put_many(struct percpu_ref *ref, unsigned long nr) { unsigned long __percpu *percpu_count; - rcu_read_lock_sched(); + rcu_read_lock(); if (__ref_is_percpu(ref, &percpu_count)) this_cpu_sub(*percpu_count, nr); else if (unlikely(atomic_long_sub_and_test(nr, &ref->count))) ref->release(ref); - rcu_read_unlock_sched(); + rcu_read_unlock(); } /**