Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1049121imm; Thu, 6 Sep 2018 14:32:35 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZOfbEzJ3p5S7U7tGQJAPhnTzTxX3S0qlzr0vtr3uSPq1m4YaaZU+l0m3lsiYyOajUq9VwM X-Received: by 2002:a63:c807:: with SMTP id z7-v6mr4823253pgg.77.1536269555406; Thu, 06 Sep 2018 14:32:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536269555; cv=none; d=google.com; s=arc-20160816; b=bKcjvjmHMEMYN3cR4Ntwee2axjia+koWpKRhh3uBaGztK/Pk6SPpThJh0aa+8sEW2Y I0/0enqUvF4FRs6e/bwYl699zYPId+Nyki7yOlM9/TlVod+dQguuDJW/sbZkRIl4aa2R 32f3hsJKFKcl441A28bs/CFtHm+nQHnlD7Dl0C9LCsIPHChoiTPAbU1XREQLxoGnN7tu lASn0Xu27X55+SV8D3TNe0t06fKWZIDnSugx+EJyuqJ60mvceifEIx5bXl3Txns/Gi8z 2FJRb7EXIF8k71P8YoFI7Uz6W/NuuLyxtfPNJTyDFf4iUw4LWuQvWuh0vosFgDm0LMfA EnyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=615dcgvYagoVUaB+AgYoQbpcTQ8B8tOaJJYCjiBxilk=; b=BdJD4Y+DS4kQ+flMWpHpE6zYbRJBDqL6Lb/4RO3VfLIeZteYEVczxsVsavHSqv7A7T FKBzkIYedp0vJcgxxNwK/JSEidwVYpiEVjrGM/02x3+dN3cPbZkcoy0DSO8unvIa9bVr 3jt14uGzEeAlMK3quslmKQj+hn22X4c0Mx5LzkK+j0qPNpo3EUBx0yGLqt164nf+pcxs jnvUfhGqBwGWfw/jyHNz2GlxP4zMb+pDuwxjB8b9im9H6v5oURFOzQCkkJ+wJrhxx72E YzrcI+LQE2JSVasC4QCFgHF7cAwMvu3fR+Zdb4pZ1cnojFVEL+Bl1wnbPVuw0MxgxA3Q Smcw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cpYKw5b5; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h69-v6si5896339pge.13.2018.09.06.14.32.19; Thu, 06 Sep 2018 14:32:35 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=cpYKw5b5; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730130AbeIGBXp (ORCPT + 99 others); Thu, 6 Sep 2018 21:23:45 -0400 Received: from mail-yw1-f65.google.com ([209.85.161.65]:45701 "EHLO mail-yw1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725819AbeIGBXp (ORCPT ); Thu, 6 Sep 2018 21:23:45 -0400 Received: by mail-yw1-f65.google.com with SMTP id p206-v6so4596609ywg.12; Thu, 06 Sep 2018 13:46:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=615dcgvYagoVUaB+AgYoQbpcTQ8B8tOaJJYCjiBxilk=; b=cpYKw5b57qvqc0mnWpsXkj7AztK+R0aUxg8yy/Hbvb/Sw/MUepAmkYWeYdi1e9qS96 9YcgWBUAGWZB8r+RTbfqnmuDhy3BqRlkrCDzPJwPrXlyVt/uDBj3njpcf0LK//f66aTZ Pbl3Ai1nHDhbKt0xpMglJmJKcxtB37Gu0EdD0E9Z95O8uZ7RmyD4RUMGwD65gTyWz2Yj uYJpJRyJEFfj4kUyzcEaVHiIETYNRRl3uANvbF+Pt8o0QWVovq9fB010pZyFW6WwXeqq E6d8E4U4WRL+gMRAP/oTflD0K5wHrvnzb8IlLJQOEwYFPsDTuPYRff4Ojigj9iSysgxw qtbw== 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=615dcgvYagoVUaB+AgYoQbpcTQ8B8tOaJJYCjiBxilk=; b=jNlMa3hNOggn2ZSPkiYUn6CpYYbYT9r5Goz9SQtN3yJElZy5BC8eUNQWcDIhq3OC54 Gg6raGYYssBxEZFp/QPVq1/3pjlcnznvDaz6UiUs2KtAbT77v5t5XfcRX0ZyDZgrGmPB nRt3hgO++pw+I6neGZ6xfSCOW79lOrgKchi04RL6VuruAgZfIfHCICdP2RJhyJAVyqMa 32EEP82OqoxCUAo8d3J1zrSHg0+BRbGSY23/49JXsU7/8MSU6t6Jl4fVzuHkZoq4688e 9+W4JApHCqbmSHE2tRHuMPXM+RpaFo6sDLhasORVaf/AKLZfnC9joHWMkPWvB8vCDWXQ /YJA== X-Gm-Message-State: APzg51DPoe+iRDqYB0yjav9LQJGHRlgXMP8f4QXac6Mx+98ECzxMM5p+ yXUnuZq/aSvm8NzQrR7XAmY= X-Received: by 2002:a81:7282:: with SMTP id n124-v6mr2619092ywc.57.1536266793000; Thu, 06 Sep 2018 13:46:33 -0700 (PDT) Received: from dennisz-mbp.dhcp.thefacebook.com ([2620:10d:c091:200::3:20a]) by smtp.gmail.com with ESMTPSA id c126-v6sm2746520ywa.104.2018.09.06.13.46.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 06 Sep 2018 13:46:32 -0700 (PDT) Date: Thu, 6 Sep 2018 16:46:30 -0400 From: Dennis Zhou To: Tejun Heo Cc: Jens Axboe , Johannes Weiner , Josef Bacik , kernel-team@fb.com, linux-block@vger.kernel.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 13/15] blkcg: change blkg reference counting to use percpu_ref Message-ID: <20180906204629.GD26048@dennisz-mbp.dhcp.thefacebook.com> References: <20180831015356.69796-1-dennisszhou@gmail.com> <20180831015356.69796-14-dennisszhou@gmail.com> <20180901003159.GK1488037@devbig004.ftw2.facebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180901003159.GK1488037@devbig004.ftw2.facebook.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Aug 31, 2018 at 05:31:59PM -0700, Tejun Heo wrote: > Hello, > > On Thu, Aug 30, 2018 at 09:53:54PM -0400, Dennis Zhou wrote: > > @@ -217,6 +240,10 @@ static struct blkcg_gq *blkg_create(struct blkcg *blkcg, > > blkg_get(blkg->parent); > > } > > > > + ret = percpu_ref_init(&blkg->refcnt, __blkg_release, 0, GFP_KERNEL); > > So, while this would work in some configs, you can't depend on RCU > grace period inside percpu_ref. blkg is now percpu-reference counted > and rcu protected object - it has to explicitly go through a rcu grace > period before release. > Ah ok. I've made it into a call_rcu which should work. Thanks, Dennis