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=-7.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 3641DC433DF for ; Mon, 24 Aug 2020 09:20:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D2AFF206F0 for ; Mon, 24 Aug 2020 09:20:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kernel-dk.20150623.gappssmtp.com header.i=@kernel-dk.20150623.gappssmtp.com header.b="S1z/AmmN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D2AFF206F0 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.dk Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 35F266B0008; Mon, 24 Aug 2020 05:20:31 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 310EB6B000A; Mon, 24 Aug 2020 05:20:31 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 226746B000C; Mon, 24 Aug 2020 05:20:31 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0057.hostedemail.com [216.40.44.57]) by kanga.kvack.org (Postfix) with ESMTP id 0CF526B0008 for ; Mon, 24 Aug 2020 05:20:31 -0400 (EDT) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id BAAE38248047 for ; Mon, 24 Aug 2020 09:20:30 +0000 (UTC) X-FDA: 77184916620.07.curve96_510f0a727052 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin07.hostedemail.com (Postfix) with ESMTP id 930DF1803F9A7 for ; Mon, 24 Aug 2020 09:20:30 +0000 (UTC) X-HE-Tag: curve96_510f0a727052 X-Filterd-Recvd-Size: 4493 Received: from mail-pl1-f194.google.com (mail-pl1-f194.google.com [209.85.214.194]) by imf45.hostedemail.com (Postfix) with ESMTP for ; Mon, 24 Aug 2020 09:20:29 +0000 (UTC) Received: by mail-pl1-f194.google.com with SMTP id h2so3941090plr.0 for ; Mon, 24 Aug 2020 02:20:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KQzdEJUadSVD+lgD6sVSSDMTvkRGkwdel+4+TdgeUE4=; b=S1z/AmmNOCH9afSNr/qrDInALgK0j4q5VYp45vGoszL08gQOq77XWvhovm91maa4+P FqKO0IvQQ1zgFOTeD7xwiYdXCC4eSy866y0i4iOHUdhtIcu9OyTLXqq9sIjITeHIlDP/ TqDQL3++BGqzXH8U95cUEVFQg9f7Oyelz1pTusAebmjo7UGy1iK4oNwyu8zu1fDcAfPX nbF7uSCxB/11Zqo85kx55hx/wYlWNGXWIUW2MXqUz8acgYZGRkoKmiKOAMbN76qrQ5Ur CsLY7wA5OwEKSwWBknbMM6OhsOsgmjQ3BQKlOzM52TKrjGMbACD7aubcslrIXV21mpIp D4Mg== 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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=KQzdEJUadSVD+lgD6sVSSDMTvkRGkwdel+4+TdgeUE4=; b=qC1QqHmh2cAFWpCzmkfd0vRZ95D5Oh3/T82qyDW1s/1H1Bj6MhZMF4lLZNdQuasevk WXSRyumoeHelAuYcwZgUIiFXgu07Zn4gMDi8nrVQA97pvnu97dRekT/EASOXadh+/pgW CntoRqgVs2y6ublZQunMEdR322Gi9gKR+BmQh0gTNW5bRin2aGtt21Z+RbMhFVM8Q41H JLkAPvao1Nm6kOZmCxDZrD2FG+VYUdrG3mSOhckC3pyRcQZr+sZojvvCbGBBZ/uLCaOJ oK2GAZv1WuzZIn8oaX8Yx3qbpWD898wCb7BZCm5jwu/0+d3MCFqDTyULPihrgP0gQv5i NM0g== X-Gm-Message-State: AOAM5302RjA3Ec2cVjiA1p04Sj8SYzR+mn3KVBmlOi7322j9sqwcCJWI nRRNNVi5K0oQI6jZn6sgGHmqTg== X-Google-Smtp-Source: ABdhPJyCrZvD6mxlThjGGxFBbEkhy5RNyLB5+uuwXeW5h1XhNu5PQ5mV/pcyDAllrzYkYjEheHn/mA== X-Received: by 2002:a17:90a:f994:: with SMTP id cq20mr3717444pjb.229.1598260828641; Mon, 24 Aug 2020 02:20:28 -0700 (PDT) Received: from [192.168.1.182] ([66.219.217.173]) by smtp.gmail.com with ESMTPSA id x144sm897257pfc.82.2020.08.24.02.20.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 24 Aug 2020 02:20:27 -0700 (PDT) Subject: Re: [PATCH 4/5] bio: introduce BIO_FOLL_PIN flag To: Christoph Hellwig , John Hubbard Cc: Andrew Morton , Alexander Viro , Ilya Dryomov , Jeff Layton , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, ceph-devel@vger.kernel.org, linux-mm@kvack.org, LKML References: <20200822042059.1805541-1-jhubbard@nvidia.com> <20200822042059.1805541-5-jhubbard@nvidia.com> <20200823062559.GA32480@infradead.org> From: Jens Axboe Message-ID: Date: Mon, 24 Aug 2020 03:20:26 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20200823062559.GA32480@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 930DF1803F9A7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam03 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 8/23/20 12:25 AM, Christoph Hellwig wrote: > On Fri, Aug 21, 2020 at 09:20:58PM -0700, John Hubbard wrote: >> Add a new BIO_FOLL_PIN flag to struct bio, whose "short int" flags field >> was full, thuse triggering an expansion of the field from 16, to 32 >> bits. This allows for a nice assertion in bio_release_pages(), that the >> bio page release mechanism matches the page acquisition mechanism. >> >> Set BIO_FOLL_PIN whenever pin_user_pages_fast() is used, and check for >> BIO_FOLL_PIN before using unpin_user_page(). > > When would the flag not be set when BIO_NO_PAGE_REF is not set? > > Also I don't think we can't just expand the flags field, but I can send > a series to kill off two flags. (not relevant to this series as this patch has thankfully already been dropped, just in general - but yes, definitely need a *strong* justification to bump the bio size). Would actually be nice to kill off a few flags, if possible, so the flags space isn't totally full. -- Jens Axboe