Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp67297imm; Fri, 31 Aug 2018 17:33:22 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYtKEKzKPRzr7dSvr3Uo0gFCwmExHY9bMfa0muKbrm2boSWE2CV06aZ7RlqR6J5IaCpryLJ X-Received: by 2002:a17:902:7884:: with SMTP id q4-v6mr17699427pll.174.1535762002811; Fri, 31 Aug 2018 17:33:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535762002; cv=none; d=google.com; s=arc-20160816; b=YxqSDLfsbHoD5JAtt7fedEpt8W186rrOTg20uvkTqlMR/jMzWRK5VUMN9lq0Stum6o xInkhlyDQcDWxp0PKlHq3IAPOv5I3G0bq8lth43JBWeFtvTJClJhocc27rPLJ3CfzQQ4 oRgo5R4J3k0SxCkA/Wzb7nVu5aX4cVMiI7tMllKtpm06TBolSDeXRLhOPoolbbB47rF1 NIJZ7fdTmAdJFwmZzhYoPkVL/ZvyJQT81AAxClqjkqOPSlsa6KXyIHTkUgAJPX95J6cb CKMzb7erJ1ikgHOMlQoqZboLTiwZLexlRsb+pPZD7CEtwHipOjm5lyVJeWCtDkAIDrOj RuDQ== 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:arc-authentication-results; bh=ojr44WcL9JloHkAG32yJd+JB5DekUlgrznnwrkKSSJ0=; b=Op7RYBxbhE0skXGuYwXdGIJE86p9TqNtwAOm5NLZM9SfiQ9gwujwDr1ttWNFQ4CXwr wpJLWqSslkJvRPZ1fNZxQSinJQZQm02lOBPUdx00AeIep5oLFfMcKFOT21hh8g6xoOe0 h1bX30NRFh0NW8gs2s8TwhT9YvgpEbHxRpyyEWlLKH0SrxIxl37La62p3erTNO0ZZeqX SXBGHjFJfIj40eHzt+uKVQEe6srBv5UrJUUwI2WPPN3Ly2fGcYx+LIMFaXoxbPu2IDHv koa8Hr7y8IGLnjM3rIOlXCaCbGeH4i3WWVuyl2tDGNeGkc31uZ63q/7GFy+OvGfN8U/G +oyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=HIwL1EDO; 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 v66-v6si11937430pfb.368.2018.08.31.17.33.07; Fri, 31 Aug 2018 17:33:22 -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=fail header.i=@gmail.com header.s=20161025 header.b=HIwL1EDO; 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 S1727552AbeIAEmB (ORCPT + 99 others); Sat, 1 Sep 2018 00:42:01 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:37229 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725988AbeIAEmB (ORCPT ); Sat, 1 Sep 2018 00:42:01 -0400 Received: by mail-pg1-f194.google.com with SMTP id 2-v6so5608556pgo.4; Fri, 31 Aug 2018 17:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=ojr44WcL9JloHkAG32yJd+JB5DekUlgrznnwrkKSSJ0=; b=HIwL1EDOpifB9LPjiuImCUovu6gdxbO+p9an9ARPJNqoGshbDu0kLq7M1U5nbtI+jM xw97Wx1fUqg4ppq0gda9FqNeJzrRi0cIjxWkEALuD1qqbl+CXSKAQN4KIjBYmASn7KtZ V2lm2+Ss+4PSFaBRMN3hOv6T+ne3B5Bijyt3toTvkiFE5T5Ljgdqw51An4x+QU3S2k2X vy30jqTcUtXCL9HomopiwKxASpmjEQds29er0ICLgrSDMUoSWEHyZwoHLgiUoEsP+OJh X/WM9GJQmP6o4SsKqn/7YAJuzsTi7onTF5bdA9tWDVaWkyn3bWdEI182l/DOFBl2tdXx 2Wfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=ojr44WcL9JloHkAG32yJd+JB5DekUlgrznnwrkKSSJ0=; b=IFqrTuZMj4UftpAtIZn6NesVNjb4dJx8lms4t+8733rDuBmxEFx8q9uHxUnqC7Rmwj De1Tcfy0ymwgQGGvHdrM3quMZSGCRX4sSH7lUBMWrKXRSuJEgZiyDWdDEs395Fnbm2X4 K1nFcCH8MLLnWtjuGnoaAM5OG26Gjf7qQ+rTAEezmIZn76ohnGX+/Jp+/ul8zBG8KTWR vRs2WBwS6ccErlMIA4dJwnPn8H+iIGPoz3ptUlSKcIJMuFZlhnBcfRH3WIqWERwQhjpF Adwr3CoHEp1GerK9H77wrPZMq16EZ/0Wae1jZP3CguZuVhHitzuE/DApb9h8nUqiILmC expw== X-Gm-Message-State: APzg51BNsXgf9GbEX2tj5zoy0FolFGaQkFcdeD+7Nj7Zn1jbNezWuboz uB1CszhcPzxuME/oQQYKvZ4= X-Received: by 2002:a63:cc04:: with SMTP id x4-v6mr16314811pgf.33.1535761923047; Fri, 31 Aug 2018 17:32:03 -0700 (PDT) Received: from localhost ([2620:10d:c090:180::1:a245]) by smtp.gmail.com with ESMTPSA id s85-v6sm19047754pfa.116.2018.08.31.17.32.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 17:32:02 -0700 (PDT) Date: Fri, 31 Aug 2018 17:31:59 -0700 From: Tejun Heo To: Dennis Zhou 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: <20180901003159.GK1488037@devbig004.ftw2.facebook.com> References: <20180831015356.69796-1-dennisszhou@gmail.com> <20180831015356.69796-14-dennisszhou@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180831015356.69796-14-dennisszhou@gmail.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Thanks. -- tejun