Received: by 10.192.165.156 with SMTP id m28csp1002382imm; Wed, 11 Apr 2018 10:37:25 -0700 (PDT) X-Google-Smtp-Source: AIpwx48FEwhqMLFzIu0I8Xa7SicXBvct99tHmoe3Gb13r0XWulr3hKflpXC0pWfsiWmRE0cwNbSC X-Received: by 10.167.134.25 with SMTP id p25mr4764124pfn.93.1523468245793; Wed, 11 Apr 2018 10:37:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523468245; cv=none; d=google.com; s=arc-20160816; b=fKGX+DQHjZQ+ZLimhNSgyPVs+4EQmmcMxfVbeLLGGip1dKhZXXnFr9KjwPffG5HTlP n6F2GsWPImPAAyrodMYYz6Rv01XIqwGx6ubXCSbg1BujotcLBxAE8GThh2BRaicrI8qf mdOZuM773lW5Yr+BTR4o7SfVUZSK8L5m+jlEGaRl5N8yTcihFFTPmwkUmPD5Km9nBMwY kqbF8ox+2Xqz3EVNU9/K900UOqJJ76mw75DzDyQ5e3soVsCRshRaunw3UcFhSDRScMT6 ZvoW4wWV+o5aZpg8PKXi73jAqpW5H7Omjujr5AB+ONdwhN7qQ8RwrWUuJ6q3QbCdVRNB N2NQ== 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=7fN/uZNvrBN6YzAi/VWIa7UP3DhVJYvDiFVptymhecw=; b=m0uKNgNh+/jBoLwSILYDS3Dj5gwJQI4oBFRqORp89lfZ4YURoorKqUFqJ621sQ+bjh 6toOgzFqoQMI6pPqtAWMHlaCW+muDKL0+XoBvcyiLXDhCp2prMfMFrlsNfQwKADiy6B1 m/bMdvCOOYB9WfheXiLx9EaXklLL0PS0bEFGcAk3fWs4Cql2WBTbwoA6kDte4skJ1kE6 4tTJdPk617zNW9RxigDcgqJqayU47q8nUEmtgOlcF6ls2X0jQ0eqHpfb+AauePoEgSYM 4Agyh7X0ENYuyuagYYSa3vT3ZFV/Jav8niiqBPwHG2IzxvvwZiBggvVjO7+E7P2Lro4M x7oQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=MiLi0eLJ; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 32-v6si1557254ple.282.2018.04.11.10.36.48; Wed, 11 Apr 2018 10:37:25 -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=MiLi0eLJ; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752861AbeDKRbE (ORCPT + 99 others); Wed, 11 Apr 2018 13:31:04 -0400 Received: from mail-yw0-f178.google.com ([209.85.161.178]:41930 "EHLO mail-yw0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752194AbeDKRbC (ORCPT ); Wed, 11 Apr 2018 13:31:02 -0400 Received: by mail-yw0-f178.google.com with SMTP id u15so816913ywg.8; Wed, 11 Apr 2018 10:31:02 -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=7fN/uZNvrBN6YzAi/VWIa7UP3DhVJYvDiFVptymhecw=; b=MiLi0eLJ7bIoVtZPEjVLQrUtfMwe0A48EoGuhB0G/SOgOFL+K9EBdG3j3bkTbl7l1G W3n8rfdbqIR/MOrpNcVUUWpq38tb8OMqX5AigKFVaQtW6JQjIqrEQzJJYTPYSQfTXHFk euXee/e9Awn69SDm5CHvI1wDA6ofOlKnvH4u0r7LBp/eR9jfgVTon7Piz7uqWOVlzaXc D/b8/dP8AdC1IVNsMH1JxrdCy/HgtAtpbD8MF/y8xroMJsbu23g+cUBKE0SVTPYLpkLK kBy3q0KD3MohN4ohFPX7gLz5S24KCAUNJfL03o6so8S0DaV1sDpMPudvJ+J2ZgoAF2um Bpxg== 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=7fN/uZNvrBN6YzAi/VWIa7UP3DhVJYvDiFVptymhecw=; b=kKP/nGeu3cPMpw94+InMEYHAgoyAKR7cZQXnubFC5dgd56F71GmRwqLdmLdY1gDeBB U+/ZnX8hIFcG21tbrIob6nBCABDNZEIoFfHQHIUq4A54c0eHPU5kbM2uSzlPgw0uW++8 vnByK3F7iCJ8LQcbczVrbuadOMqagEkpYa3EpbbIC/hQVnrGf97xfIjcJ1m00ygf/IAQ eNnRJpGSJ5kfwACF9rMwnAjUwp1azVykSViiTBPBtw0drth+b4jpjZeQzu0odnlMDYP+ z3noYMBHUIdROuYho4AJVVzLWT8gG92V2nbyb0xp5g8Vw1nT6JR2WpQ/GTTpbJUu5JSm DWew== X-Gm-Message-State: ALQs6tCHZuSlcN9zox+BHUvqnYVH+4wU083WotvuNk1xFzwfTho5JpHf WWStxTKYXLATbQGcTcrEl2g= X-Received: by 10.129.75.199 with SMTP id y190mr2564185ywa.409.1523467861543; Wed, 11 Apr 2018 10:31:01 -0700 (PDT) Received: from localhost ([2620:10d:c091:200::1:e6ed]) by smtp.gmail.com with ESMTPSA id t66sm627199ywe.8.2018.04.11.10.31.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Apr 2018 10:31:00 -0700 (PDT) Date: Wed, 11 Apr 2018 10:30:59 -0700 From: "tj@kernel.org" To: Bart Van Assche Cc: "linux-kernel@vger.kernel.org" , "linux-block@vger.kernel.org" , "nborisov@suse.com" , "axboe@kernel.dk" , "shli@fb.com" , "gregkh@linuxfoundation.org" , "00moses.alexander00@gmail.com" <00moses.alexander00@gmail.com>, "arnd@arndb.de" , "joseph.qi@linux.alibaba.com" Subject: Re: [PATCH v2] blk-cgroup: remove entries in blkg_tree before queue release Message-ID: <20180411173059.GO793541@devbig577.frc2.facebook.com> References: <20180411142019.GG793541@devbig577.frc2.facebook.com> <20180411142859.GB2322@gmail.com> <20180411144616.GI793541@devbig577.frc2.facebook.com> <20180411145123.GJ793541@devbig577.frc2.facebook.com> <20180411145632.GK793541@devbig577.frc2.facebook.com> <20180411170018.GL793541@devbig577.frc2.facebook.com> <398bad36e2f01e37645a36d052d62136766ee88d.camel@wdc.com> <20180411171538.GN793541@devbig577.frc2.facebook.com> <6cd1d285f726f81186dbab57c3308cc0b257ff99.camel@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6cd1d285f726f81186dbab57c3308cc0b257ff99.camel@wdc.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 Wed, Apr 11, 2018 at 05:26:12PM +0000, Bart Van Assche wrote: > Please explain what you wrote further. It's not clear to me why you think > that anything is broken nor what a "sever model" is. So, sever (or revoke) model is where you actively disconnect an object and ensuring that there'll be no further references from others. In contrast, what we usually do is refcnting, where we don't actively sever the dying object from its users but let the users drain themselves over time and destroy the object when we know all the users are gone (recnt reaching zero). > I think we really need the blkcg_exit_queue() call in blk_cleanup_queue() > to avoid race conditions between request queue cleanup and the block cgroup > controller. Additionally, since it is guaranteed that no new requests will > be submitted to a queue after it has been marked dead I don't see why it > would make sense to keep the association between a request queue and the > blkcg controller until the last reference on a queue is dropped. Sure, new requests aren't the only source tho. e.g. there can be derefs through sysfs / cgroupfs or writeback attempts on dead devices. If you want to implement sever, you gotta hunt down all those and make sure they can't make no further derefs. Thanks. -- tejun