Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp11504imm; Fri, 31 Aug 2018 15:26:04 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaI9gAhrSteXsjZLV3r7VdSCivDmaka0Ub/a1iFdmgVk53oSa1KzstbpD3kosVS4hB6rpH7 X-Received: by 2002:a62:cfc6:: with SMTP id b189-v6mr18128653pfg.224.1535754364893; Fri, 31 Aug 2018 15:26:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535754364; cv=none; d=google.com; s=arc-20160816; b=KXsGoMzQI9VDJiuR0g9B0zT5mZQkayXWz1Y3AT9jDGVpzJjG7P1jtbjvByBHY0xfxZ aLBToStte3NRUC+Im5mEC31XCsJ3tTV8nzRV5oEsH25sgSSMvNCUGy2c8vWl4gvlGXAQ 2+6CX8HiS7yLN0tDUjXm5Lr2r8LxoSz8XyZ4m1EVJUYVMGzqPAKUL8QF1CoEA6IZJMYQ d3/mmCMaqQfcdx8unTVtEk0wEvzd/HTlrwAE+FIE/UeSQ1ivaDAHMv4YLqqR2XOq8WZf I/vL7Q915da8DigX5yJG7l0DhbJmXQsAdJXRe02SgrNDgXpa/IZCxXJDehHQzgBo/x/n K85Q== 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=6eYN1qllWYHTmUDJ48f68iHeHMhzkffLFI0awVIa5j0=; b=k8P3/4jB4Fd0OoRzOjYDr51S7zYYVJH2OKh2sma6prgwVq/yuRPFLkGSBapivkCLXQ g1V0Ty/Z1K3vquvXhs8fzT1rD8uJWLRzeLUKUkrstDKVSlPSCohsrTDqtmP4yGpuhXDU 1Kj61nk29fIY5V+XyHYLTjUILib11iE7kqiXyf2p5J5zQXnvQ6Kh7lhrU1VJCNw6/ldh 9CeYbb5/NXWh4QDdbxvnJPP7y0JyBYAG8ffadI+hWJD7Zk++Eq+KzWtzGLnWjGU5cYL8 BzWVTrYQBtAZXVw1KExToYS8icBjHRqUFFCgMmxGPrgtLmRvztaxKy7RZ1ww85mGVY3C Hsow== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=kPrEjU5e; 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 j24-v6si11107043pfk.203.2018.08.31.15.25.46; Fri, 31 Aug 2018 15:26:04 -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=kPrEjU5e; 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 S1727616AbeIACdt (ORCPT + 99 others); Fri, 31 Aug 2018 22:33:49 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36598 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727261AbeIACdt (ORCPT ); Fri, 31 Aug 2018 22:33:49 -0400 Received: by mail-pg1-f196.google.com with SMTP id d1-v6so6034263pgo.3; Fri, 31 Aug 2018 15:24:16 -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=6eYN1qllWYHTmUDJ48f68iHeHMhzkffLFI0awVIa5j0=; b=kPrEjU5e2tK87pz9E+X9q6lm3tr0PBJW8xWmrwPflD2HwZs1flPrzhhJO0NP1T+/2G yO9iCKAM5cKiTfTWlrY3PgOuECfW8naSaRd/NSsfi1DZE5W8JNfUDkiImCOQTRzf7KDH sIezu5Cvrh+kYNPY1fxh74Vhc7rnLzcxts5k1xeflN7eOwn21QCzR5QCcxFTKV/oud44 NFeNlPnCz6pgDQAqyOazGnPvQfXwQfc+pC58Cj9h2vZBQl08oqwg1BhVvXBq91WBj4Ej cUMhkxFB0LMqH3pYEvYLbRZ35I00MdGLWtfE7FDgfMoT1B9nWaTR1gglNzBhEMdvimtZ 58yg== 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=6eYN1qllWYHTmUDJ48f68iHeHMhzkffLFI0awVIa5j0=; b=Ypwpuh9cBgmHR7m7erpYVFM21CwVx0V5+/Pw3MXMytXwzti6DQVr+zm4ySP45YVFoI 2m8vuTnMcCIkWjqG78T0lahCMd/0VYP5wEM5g+Vg9ZaPnZVB5ly3bM39MFfXlZS6Ysp6 5W65kuYzDfhMt1pFNddkVm7xLTtWqRh6xuhDWG7TerK4I5i+Jxy/h1SCesg1772H3+O7 G3Nu02wc8S8IMzgjWfY1vUzose5i17dsyJmLVIkCaSeJ/eTkSji1W/ybn6TkpfVjqoGR bIf6GsE3hh3mRdjTpfZ8VGTsXeQXQTwsVjmLd+N+RUi8rqbPI9LKyWliVB8mYCXYHfBb WIgw== X-Gm-Message-State: APzg51BOH9f+2hW4g8Y3JLt1kTDY8O6fA9nKxDeaVgFYldUxo18Vl2u6 Mzc0QwVLs4gyNOHRp+6dumY= X-Received: by 2002:a63:e70e:: with SMTP id b14-v6mr9282200pgi.68.1535754256590; Fri, 31 Aug 2018 15:24:16 -0700 (PDT) Received: from localhost ([2620:10d:c090:180::1:1347]) by smtp.gmail.com with ESMTPSA id b6-v6sm9856619pfh.182.2018.08.31.15.24.15 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 31 Aug 2018 15:24:15 -0700 (PDT) Date: Fri, 31 Aug 2018 15:24:12 -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 0/3] fix blkcg offlining and destruction Message-ID: <20180831222412.GA1488037@devbig004.ftw2.facebook.com> References: <20180831202244.21678-1-dennisszhou@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180831202244.21678-1-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 On Fri, Aug 31, 2018 at 04:22:41PM -0400, Dennis Zhou wrote: > Hi everyone, > > This is a split of an earlier series I sent out [1] containing the first > 3 patches with fixes from feedback. This series tackles the first > problem where blkcgs were not being destroyed. > > There is a regression in blkcg destruction where references weren't > properly put causing blkcgs to never be destroyed. Previously, blkgs > were destroyed during offlining of the blkcg. This puts back the blkcg > reference a blkg holds allowing blkcg ref to reach zero. Then, > blkcg_css_free() is called as part of the final cleanup. > > To address the problem, 0001 reverts the broken commit, 0002 delays > blkg destruction until writeback has finished, and 0003 closes the > window on a race condition between a css migration and dying, and > blkg association. This should fix the issue where blkg_get() was getting > called when a blkcg had already begun exiting. If a bio finds itself > here, it will just fall back to root. Oddly enough at one point, > blk-throttle was using policy data from and associating with potentially > different blkgs, thus how this was exposed. For patches 1-3, Acked-by: Tejun Heo Thanks. -- tejun