Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1220172ybz; Fri, 1 May 2020 17:24:45 -0700 (PDT) X-Google-Smtp-Source: APiQypIQlu76bTPCddtCSwiCrCil/hrOU/rA/Bv3cfFe2iJ/6BH6V1t8ACXuTEv9yPTlHcu7F9by X-Received: by 2002:a17:906:459:: with SMTP id e25mr5780178eja.379.1588379085087; Fri, 01 May 2020 17:24:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588379085; cv=none; d=google.com; s=arc-20160816; b=cb9tyS58p10KbobDyQTDV3kmi6dV63VwAyZpl67nNNcsHfz3FTAKEE6PLd1EQZnCeX z0UcEP6aYdNGjE1LrBXvrwTTFLUqi7lbVwa9+uaTI/D3+42uJDjcEtDj4qS3is+rZ2Yi hvz/DWMZnf/yvRZ4kIGucP/GPrEo9MzvCSz2AqjryubcQgn1bBIRso01PM7vX1OdNVxV U1YDyfaSAut2U11Oo2Zojrh/DRpsQcwVUBuy3j0OJ6Q1Lxwiz3Uipi7DzqiE1EuinD+h dsoYm5bmbhPSKKjqQW0t2U+9vnrrNZ7USGqssV7nrQWOvXYlSZThBg0ixfA402MuJC0Z g8SA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=xqP1ypKDzEDw8qavmEZaNBpUnC4fGF3wqn5BkO6DJEw=; b=O6n2t1wt4iPSs5qob1SGegt47T7HcKHWnPJa/29WhzxLv0B0YaqVHaI7jpKBe2tdDL 0GVYov6NpM1V2gsN6LZ4VPBFJCwck9bxx1OyBdLQnIh+ZrnmZhEkaCUjL1aXjkPodG/T hxW87fxtfsPiAytb2DlBq/xL9UcCYEfZIChY2d3/2HdqBDyOmoCnkDEEvzT3dxBHA1j4 kfmWzvOOM9vwgEOgEgVmIt9Y6ff/8bb38VqssSSbTbTWWjNeu0FynM3mSgj/Wft6SfFZ E1EWGNa+4CnG8bDfKQegGm7zMH9AIjtgPYt/lzB2dDxd8lAdWnMLVYnp6JP5Yolq1xdy fcJw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o61si2499621edb.125.2020.05.01.17.24.21; Fri, 01 May 2020 17:24:45 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727097AbgEBAWR (ORCPT + 99 others); Fri, 1 May 2020 20:22:17 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:32969 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726352AbgEBAWR (ORCPT ); Fri, 1 May 2020 20:22:17 -0400 Received: by mail-pl1-f193.google.com with SMTP id t7so4217747plr.0; Fri, 01 May 2020 17:22:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:autocrypt :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=xqP1ypKDzEDw8qavmEZaNBpUnC4fGF3wqn5BkO6DJEw=; b=JWEIY2csSErLBWeVaLNOjxdIDxxoYounSqOlxjjHKCnRGaifTn5BHXoPRjkYBMstB2 L2vgoK/PbXJSItFg8CqBG6zAizKh3rD2n9q737HfEZ0K5F6mNeLjc6GKs2yqI27H44DM fLH2SDWLbXGDXNn6tdN3WQKEs+E0ag6C4DG6F1gwL2R5LMGpQPELzxfvxfcCCMZX+6XM vRdA+CwJSyWMloKfwZvQ+3pmywiXQMOxY0rL+ypI+Scy50VO6s4jRjzKhD9G9KOcsbdb 6OG6BxQK/SEEfIksYcZQrvR7HmsvxFSVvMre4fIAHwYjkABuF/OrOK9UxPEpkA0Zmzrr 575w== X-Gm-Message-State: AGi0PuZTYaqYPbGrvV5rUO/FuSbzoBP91CW2lhi6ewFEfA/hmyMLQy7s 2VH4Y5foUdeAFfp15c21g4g= X-Received: by 2002:a17:902:6b05:: with SMTP id o5mr6451646plk.274.1588378936357; Fri, 01 May 2020 17:22:16 -0700 (PDT) Received: from ?IPv6:2601:647:4000:d7:3401:2e72:5c00:8ec0? ([2601:647:4000:d7:3401:2e72:5c00:8ec0]) by smtp.gmail.com with ESMTPSA id o11sm2863889pgp.62.2020.05.01.17.22.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 01 May 2020 17:22:15 -0700 (PDT) Subject: Re: [PATCH v3 1/6] block: revert back to synchronous request_queue removal To: Luis Chamberlain , 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 Cc: 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 References: <20200429074627.5955-1-mcgrof@kernel.org> <20200429074627.5955-2-mcgrof@kernel.org> From: Bart Van Assche Autocrypt: addr=bvanassche@acm.org; prefer-encrypt=mutual; keydata= mQENBFSOu4oBCADcRWxVUvkkvRmmwTwIjIJvZOu6wNm+dz5AF4z0FHW2KNZL3oheO3P8UZWr LQOrCfRcK8e/sIs2Y2D3Lg/SL7qqbMehGEYcJptu6mKkywBfoYbtBkVoJ/jQsi2H0vB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UCVI67igIbDAAK CRBxXD01xc4QCZ4dB/0QrnEasxjM0PGeXK5hcZMT9Eo998alUfn5XU0RQDYdwp6/kMEXMdmT oH0F0xB3SQ8WVSXA9rrc4EBvZruWQ+5/zjVrhhfUAx12CzL4oQ9Ro2k45daYaonKTANYG22y //x8dLe2Fv1By4SKGhmzwH87uXxbTJAUxiWIi1np0z3/RDnoVyfmfbbL1DY7zf2hYXLLzsJR mSsED/1nlJ9Oq5fALdNEPgDyPUerqHxcmIub+pF0AzJoYHK5punqpqfGmqPbjxrJLPJfHVKy goMj5DlBMoYqEgpbwdUYkH6QdizJJCur4icy8GUNbisFYABeoJ91pnD4IGei3MTdvINSZI5e Message-ID: Date: Fri, 1 May 2020 17:22:12 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <20200429074627.5955-2-mcgrof@kernel.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-04-29 00:46, Luis Chamberlain wrote: > The last reference for the request_queue must not be called from atomic > conext. *When* the last reference to the request_queue reaches 0 varies, ^^^^^^ context? > and so let's take the opportunity to document when that is expected to > happen and also document the context of the related calls as best as possible > so we can avoid future issues, and with the hopes that the synchronous > request_queue removal sticks. > > We revert back to synchronous request_queue removal because asynchronous > removal creates a regression with expected userspace interaction with > several drivers. An example is when removing the loopback driver, one > uses ioctls from userspace to do so, but upon return and if successful, > one expects the device to be removed. Likewise if one races to add another > device the new one may not be added as it is still being removed. This was > expected behaviour before and it now fails as the device is still present ^^^^^^^^^ behavior? > +/** > + * blk_put_queue - decrement the request_queue refcount > + * @q: the request_queue structure to decrement the refcount for > + * > + * Decrements the refcount to the request_queue kobject. When this reaches 0 ^^ of? > +/** > + * blk_get_queue - increment the request_queue refcount > + * @q: the request_queue structure to incremenet the refcount for ^^^^^^^^^^ increment? > + * > + * Increment the refcount to the request_queue kobject. ^^ of? > /** > - * __blk_release_queue - release a request queue > - * @work: pointer to the release_work member of the request queue to be released > + * blk_release_queue - releases all allocated resources of the request_queue > + * @kobj: pointer to a kobject, who's container is a request_queue ^^^^^ whose? > +/** > + * disk_release - releases all allocated resources of the gendisk > + * @dev: the device representing this disk > + * > + * This function releases all allocated resources of the gendisk. > + * > + * The struct gendisk refcounted is incremeneted with get_gendisk() or ^^^^^^^^^^ ^^^^^^^^^^^^ refcount? incremented? Please fix the spelling errors. Otherwise this patch looks good to me. Thanks, Bart.