From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D780AC54FC9 for ; Tue, 21 Apr 2020 13:55:38 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 92DC920644 for ; Tue, 21 Apr 2020 13:55:38 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Oa3l8piB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 92DC920644 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3FF188E0005; Tue, 21 Apr 2020 09:55:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 3AFA08E0003; Tue, 21 Apr 2020 09:55:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2C5648E0005; Tue, 21 Apr 2020 09:55:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id 14D158E0003 for ; Tue, 21 Apr 2020 09:55:38 -0400 (EDT) Received: from smtpin30.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id A4C3540D0 for ; Tue, 21 Apr 2020 13:55:37 +0000 (UTC) X-FDA: 76732009914.30.alarm76_3115cd3c97e20 X-HE-Tag: alarm76_3115cd3c97e20 X-Filterd-Recvd-Size: 3530 Received: from mail-qk1-f196.google.com (mail-qk1-f196.google.com [209.85.222.196]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Tue, 21 Apr 2020 13:55:37 +0000 (UTC) Received: by mail-qk1-f196.google.com with SMTP id b62so14508022qkf.6 for ; 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=gHzqRLjilrApYkhTQcBhzRIG32PTCQ4xuTzdl+ejzbqrL0KYX0s6zKyynHPvxjham2 vrT3Tf1DKWTb8bfzsniFyIL3e09/21UDzORqDbHyOduzVBadVfW7iwY7+Y8N70EtH0ts TGVEWi1yLs5I9jjBcThhgBkJHMIhlCjjRxzHh7xtwp2TVnQTWHGeeglhxixyGL+XNg3J 8QxCTabxH8S4cDk4XjLJbOeyI1VY2FFZ64JSOMPldechu0bTt381w5iNAZ4GIWVOmOfz lnlmj+JucDy+g+3cFTsndS+HEYwZGyzcek5Dk0kD8KsKciRUBzWt7lYrMdgVADDGXc+c m17w== X-Gm-Message-State: AGi0PuaZiAxdAyUnAHTVmEkLZKMkRL3CjLcDn/q94JPcy7Y8wAedMNCY ix8An50dQW8T9vAvK1N0rVU= X-Google-Smtp-Source: APiQypInKCW27Sksr2RruGrr84Fcf0glvObAa7VP5aoCxArIj1/PHlvxTm9HsNw6U4bBzMxqrk+G7w== 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> X-Bogosity: Ham, tests=bogofilter, spamicity=0.000340, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.