Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp173143ybz; Tue, 21 Apr 2020 06:59:25 -0700 (PDT) X-Google-Smtp-Source: APiQypI0jwCHuhLyMEYXvD4xQv2yZKM21WY4ebfLSRAm7ZrFWv5eHNDyxiUp73aP8amW7VLD9F6W X-Received: by 2002:a17:906:3785:: with SMTP id n5mr21946748ejc.21.1587477565198; Tue, 21 Apr 2020 06:59:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587477565; cv=none; d=google.com; s=arc-20160816; b=AT13ZmLHpRz2azakQIwSuIpjzU+72i7//EbIWHNlTnXXI01u0XH/m2Gs75bF0OTjyr kM7uZx5k9AOUkzAPIy1jrGNyhtlpB8KQEbQDRX1AR1utnrcqV/H5LZoYhniN8meAu3CS qlxe9P3XOlJiBA59+ItqWDye6hzRRkfIkpWjH6LSs0oULtlYr75bu+N/qx/Z7QouelkA o5VCSGcHE2LQXacCvEAr73khfKmYSurMJlHnZ1XlXORThuAnI9/9lPBkhRuWCHTJ9bQq /w8qn+DyjRVYZ9UnoeGKzpTtEaqxL90fwqUsyQFBCLkGq79y1IyZweuB35bGh8V4fDXE Xabg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=JdVf9BN3VBYjlAhO1URHy0+Z7z5xubg6gKNXsMj3SD4=; b=LEEQDGhE8OiLpERmztSLM13q88Gsm12uEyCNCN2rNLni08140GJ6WzJdcbeibIhbzE tx72zdZwFFt/goAo2R/HvMfIJWdhni72Qx0Vn8JcuOrPE7KWyXRGrY0VZmu+xkgczEmU SIck7aVH6ONeMnzkVhVZwvwzNJKOjTTrWUjJ0klJ8WOOlq4h1MkNSHgnVA1ZCAkHEVl8 EVx9qiBNV670GZ6xix/fz4HHm2Dhe3HepRF700jXECOgxuC+vCdIpmlJGVykpFROHwIV BR3/uyu4S5P4XoZqSlYaNQyfj6D7UdmzvcD4pSSMwJmnjnQ9S9/HLWJtH75uRQa1SlGi sljw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Oa3l8piB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id c17si1552248ejn.336.2020.04.21.06.59.01; Tue, 21 Apr 2020 06:59:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Oa3l8piB; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728621AbgDUNzi (ORCPT + 99 others); Tue, 21 Apr 2020 09:55:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726691AbgDUNzh (ORCPT ); Tue, 21 Apr 2020 09:55:37 -0400 Received: from mail-qk1-x743.google.com (mail-qk1-x743.google.com [IPv6:2607:f8b0:4864:20::743]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B449C061A10; Tue, 21 Apr 2020 06:55:37 -0700 (PDT) Received: by mail-qk1-x743.google.com with SMTP id v7so14556472qkc.0; Tue, 21 Apr 2020 06:55:37 -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; bh=JdVf9BN3VBYjlAhO1URHy0+Z7z5xubg6gKNXsMj3SD4=; b=Oa3l8piBEzFzpUodpAlB8sX2rIFN5rCXcXoK/64lBT5B4WYoVSwHlYi34Q5qywt28H cfvMFt9WTY5nAH/3jZaU6gCro5xLxShm8sZTIbJ663fFyYihQBaJ2+KIrIjmiuNvsaZH xLXvGjPvLO80jKeV+hYT8pMCUHQ1ECHN+VH4USRvsCwp7x5nC+1YpdZsFWdg6nteG+wS TPWaFEd1X/gT+pZzFfJPhG/793rk8haj9S21poT71hz4YSMj3z9lCUchhCA0+yE2LAyu +JBhENAXBxxMFHMnxjf4MuOG9FD3Womgna2yC/rHmrY24iXI1lb/8e3XQHAhRKi83BwG D9Wg== 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; bh=JdVf9BN3VBYjlAhO1URHy0+Z7z5xubg6gKNXsMj3SD4=; b=rPN8vrYPtvaG1PZdBEU07g5ErXvFtkil8SOKvvtKPSW877h/TwNSMqIupkBsgzOmtf /5j1ZujVG3ZUlQrH3YkO9TArb62Am5/lL3R1Bj+vBBNBYDDyrCc5v7ZcouO4hwkoMqC2 wczaEbSzdBM4HsN25t6RAiFbEYRAz4QttIiMbsQCwSBgbwOkzwh/WuTmO2yCL16oRxBj hYH3b1ZntMUhTlTebXXu6WzRhGb8p1bf1DSQ7Hki/iU/iGpq8i764PAO98tHVp5V2cNn J55ttZ7pY2xFJhsInl8K3X+1lZQBUNi4JAqQ8xQO+ul4LnA6CMuxbo+klA1ReQT4OXuv u0Ew== X-Gm-Message-State: AGi0Pua1MRRxLJjqvyNCKM5Q7y4pljWxlR1w60PXzoeAGY4sn+F+CRNB sC1he2TY7hqE5RUU4oCNTGg= X-Received: by 2002:a37:b93:: with SMTP id 141mr21368378qkl.192.1587477336425; Tue, 21 Apr 2020 06:55:36 -0700 (PDT) Received: from dschatzberg-fedora-PC0Y6AEN ([2620:10d:c091:480::1:6809]) by smtp.gmail.com with ESMTPSA id g6sm1774808qtc.52.2020.04.21.06.55.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Apr 2020 06:55:35 -0700 (PDT) Date: Tue, 21 Apr 2020 09:55:33 -0400 From: Dan Schatzberg To: Hillf Danton Cc: Jens Axboe , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 1/4] loop: Use worker per cgroup instead of kworker Message-ID: <20200421135533.GA9623@dschatzberg-fedora-PC0Y6AEN> References: <20200420223936.6773-1-schatzberg.dan@gmail.com> <20200421024845.6948-1-hdanton@sina.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200421024845.6948-1-hdanton@sina.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Apr 21, 2020 at 10:48:45AM +0800, Hillf Danton wrote: > > On Mon, 20 Apr 2020 18:39:29 -0400 Dan Schatzberg wrote: > > > > @@ -1140,8 +1215,17 @@ static int __loop_clr_fd(struct loop_device *lo, bool release) > > blk_mq_freeze_queue(lo->lo_queue); > > > > spin_lock_irq(&lo->lo_lock); > > + destroy_workqueue(lo->workqueue); > > Destruct it out of atomic context. I may as well do this, but it doesn't matter, does it? The blk_mq_freeze_queue above should drain all I/O so the workqueue will be idle.