Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2009047pxa; Mon, 24 Aug 2020 02:21:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxMiMWtRbpbf1ARCrmoQfiFbGR6vlV5isld277AO0H1Y9scPjWO4bxw9YD2Zqhj6oAxPCFw X-Received: by 2002:a05:6402:306f:: with SMTP id bs15mr4335235edb.249.1598260895167; Mon, 24 Aug 2020 02:21:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598260895; cv=none; d=google.com; s=arc-20160816; b=Yl0XwByrOhs2jupbhsGdjIeqw9d5ujEpG0E0VDARNt7DbsKaYbZ2HfbtNXWllN40Is 2+P5ag9oC7jaHFnw1CP0YbpaznZh+O/DGfAgHR3YKOj+KaDGJHd9kvigNp8EfD98Hqkp zJ0bz7CKPfDpGAQtXWu+ET8FinseGq72q2ha04sYi/+CHlPeTxotMHqfVCmgcXU9r6mD /syJS9SpR7YqqDsSkHXEYqxieaR0HoXunNs33xnhKizuiUyA31QsmcbkXFl24s+DDr6l EaRVcqdpBEeDXFnuPouCsDn0XKOCtzFor2NCWLECojP1Y0dRl2Hhi9tRLafzCoAjx3PJ CBtg== 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:from:references:cc:to:subject:dkim-signature; bh=KQzdEJUadSVD+lgD6sVSSDMTvkRGkwdel+4+TdgeUE4=; b=iQ5HPJF16iMzYXS4LlY7+JHICK9upcX/uz69u/URHGruHPX9D+9vyqLfaPCrV8WaDP lNcurD5a4/YOHUD3vslndwrR5wvw0sRtgsCb2vkThypJWxBGH1FVrcOU74DhiPe75XEr R/OwQGw4YgaAc7HE1F64JWig2zA0d6lu4UlpGyvczZK/6HFi1NZr3uULgn9lc0ZPJgrh jntGt8oKYO9muQJ9lwnYjlbDEEYBQ1BEtv1LPSEGmUtlU/au+UpmEG1i+oJTZcTICVut ycBzp1z2+B9+nBHbIIg8JlaARdH/gwuI3PQmqoG6yPiVNPIOdCKU80hEajf1nQs+v9DM 87zg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="S1z/AmmN"; 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 la24si6794945ejb.55.2020.08.24.02.21.12; Mon, 24 Aug 2020 02:21:35 -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=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b="S1z/AmmN"; 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 S1730164AbgHXJUl (ORCPT + 99 others); Mon, 24 Aug 2020 05:20:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730502AbgHXJUa (ORCPT ); Mon, 24 Aug 2020 05:20:30 -0400 Received: from mail-pl1-x642.google.com (mail-pl1-x642.google.com [IPv6:2607:f8b0:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79BF0C0613ED for ; Mon, 24 Aug 2020 02:20:29 -0700 (PDT) Received: by mail-pl1-x642.google.com with SMTP id b11so3928027pld.7 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=mQBuv2H51wGO+X5KR7FSFxJu3ANnduWf0/MAGIuZ8AZATKo9/+i4sQnOSawTM/KrA2 FbV3j0CW0P88XS23VM8RH7QeriWEc0LXUtwkloERtB2yREsMUJhSEKIkgV9h5/kkFDtP 0xJAIbgSQtm7JcKL1625yrPBA/zSvqSRHXQXsxH5i93RXepkzhcwG/j9vlctdDeCdOnl c08eidI6tP4wNry9sbjUJ9F17G58hshjyIm8DtrhAAYFh8yYGmnYJgYZB4tgaAirjheD hRdFEI34oFUwiCiuDKbM59wmGuhbDNHqVKxEllfwOh7UBcYWb6lYLh/8LDpClg3mjsjZ UOXA== X-Gm-Message-State: AOAM530L962avMkCgrLgddLGpV8OvThADtaHIWuE7ZemWAbnQCdBvPLL 3nGdfgxa+r6s9aAjX062ro5SXyvXhlpvEWlc 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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