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=-5.5 required=3.0 tests=INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham 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 5C2A4C2BA2B for ; Fri, 10 Apr 2020 14:34:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 24A79206C1 for ; Fri, 10 Apr 2020 14:34:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24A79206C1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C24538E003B; Fri, 10 Apr 2020 10:34:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD4F18E0003; Fri, 10 Apr 2020 10:34:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AEAD68E003B; Fri, 10 Apr 2020 10:34:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0159.hostedemail.com [216.40.44.159]) by kanga.kvack.org (Postfix) with ESMTP id 98ADC8E0003 for ; Fri, 10 Apr 2020 10:34:16 -0400 (EDT) Received: from smtpin29.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 4B88D180AD807 for ; Fri, 10 Apr 2020 14:34:16 +0000 (UTC) X-FDA: 76692190512.29.grape49_253b030ab1f31 X-HE-Tag: grape49_253b030ab1f31 X-Filterd-Recvd-Size: 4694 Received: from mail-pl1-f193.google.com (mail-pl1-f193.google.com [209.85.214.193]) by imf05.hostedemail.com (Postfix) with ESMTP for ; Fri, 10 Apr 2020 14:34:15 +0000 (UTC) Received: by mail-pl1-f193.google.com with SMTP id w3so722867plz.5 for ; Fri, 10 Apr 2020 07:34:15 -0700 (PDT) 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:user-agent; bh=1+yFAafrmf4pwmIiA+Y79JKIZjI1rhBMkVQpyfkMWn4=; b=t+HxKJF+7h9GenQT45qXyqe6RU3Pj3yHo9vP0USRMuGHRF0z5uVsDCVSTfzO9Vul1z YslXzAjEdrWPiu1uKcWRdisuBeuEqaxbyfG0VYV3zarIeOh53NluTh/3+tU6LLjUlWtP 7fZDHJrHGOK5I3sv351vx+PPQ4lTfJH/s1LYuc9+juKq4YTHbC1GIOxL+EBq71VIimoi XniVkreCcDy6VyWoag1I9XuwjvWpuWd+ztlm1XDBaTgKKJq3jCrfA16qJdLG/GL3+8aZ taZZnXo58MDDkUzZuUMeru/q2n6LQlaZP/uFZjqbzQKFquXK34FnooJ4Ci88HSD7pmbE t0CQ== X-Gm-Message-State: AGi0Pua8UdSIBCxqixLSYyVlmxKk0+RmIpE1Mokomz6uFKlszb2S2YuH J4fzj5bi7fwnMNxf7ZEzz8I= X-Google-Smtp-Source: APiQypKxJktnoKXxj41lDsvADCMSTOOkgTuc9TuhTySLVGXbknFKPRO/LrhuZ3BKq2cjiEPXYn1NKw== X-Received: by 2002:a17:902:b702:: with SMTP id d2mr5009440pls.211.1586529254280; Fri, 10 Apr 2020 07:34:14 -0700 (PDT) Received: from 42.do-not-panic.com (42.do-not-panic.com. [157.230.128.187]) by smtp.gmail.com with ESMTPSA id c126sm1953303pfb.83.2020.04.10.07.34.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Apr 2020 07:34:12 -0700 (PDT) Received: by 42.do-not-panic.com (Postfix, from userid 1000) id 3D52340630; Fri, 10 Apr 2020 14:34:12 +0000 (UTC) Date: Fri, 10 Apr 2020 14:34:12 +0000 From: Luis Chamberlain To: Bart Van Assche Cc: axboe@kernel.dk, viro@zeniv.linux.org.uk, gregkh@linuxfoundation.org, rostedt@goodmis.org, mingo@redhat.com, jack@suse.cz, ming.lei@redhat.com, nstange@suse.de, akpm@linux-foundation.org, mhocko@suse.com, yukuai3@huawei.com, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Omar Sandoval , Hannes Reinecke , Michal Hocko Subject: Re: [RFC v2 5/5] block: revert back to synchronous request_queue removal Message-ID: <20200410143412.GK11244@42.do-not-panic.com> References: <20200409214530.2413-1-mcgrof@kernel.org> <20200409214530.2413-6-mcgrof@kernel.org> <161e938d-929b-1fdb-ba77-56b839c14b5b@acm.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <161e938d-929b-1fdb-ba77-56b839c14b5b@acm.org> User-Agent: Mutt/1.10.1 (2018-07-13) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Apr 09, 2020 at 08:12:21PM -0700, Bart Van Assche wrote: > On 2020-04-09 14:45, Luis Chamberlain wrote: > > blk_put_queue() puts decrements the refcount for the request_queue > ^^^^ > can this word be left out? Sure. > > diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h > > index 8b1cab52cef9..46fee1ef92e3 100644 > > --- a/include/linux/blkdev.h > > +++ b/include/linux/blkdev.h > > @@ -614,6 +614,7 @@ struct request_queue { > > #define QUEUE_FLAG_PCI_P2PDMA 25 /* device supports PCI p2p requests */ > > #define QUEUE_FLAG_ZONE_RESETALL 26 /* supports Zone Reset All */ > > #define QUEUE_FLAG_RQ_ALLOC_TIME 27 /* record rq->alloc_time_ns */ > > +#define QUEUE_FLAG_DEFER_REMOVAL 28 /* defer queue removal */ > > > > #define QUEUE_FLAG_MQ_DEFAULT ((1 << QUEUE_FLAG_IO_STAT) | \ > > (1 << QUEUE_FLAG_SAME_COMP)) > > @@ -648,6 +649,8 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q); > > #else > > #define blk_queue_rq_alloc_time(q) false > > #endif > > +#define blk_queue_defer_removal(q) \ > > + test_bit(QUEUE_FLAG_DEFER_REMOVAL, &(q)->queue_flags) > > Since blk_queue_defer_removal() has no callers the code that depends on > QUEUE_FLAG_DEFER_REMOVAL to be set will be subject to bitrot. It would > make me happy if the QUEUE_FLAG_DEFER_REMOVAL flag and the code that > depends on that flag would be removed. Sure thing. Feedback on the cover letter thread patch 0/5 about whether or not to consider userspace impact changes on these changes should be detailed on the commit log would be useful. > Please add a might_sleep() call in blk_put_queue() since with this patch > applied it is no longer allowed to call blk_put_queue() from atomic context. Sure thing. Luis