From patchwork Fri May 25 03:46:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10426149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 56AC3602D8 for ; Fri, 25 May 2018 03:52:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46AE2295A6 for ; Fri, 25 May 2018 03:52:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B4F5295B3; Fri, 25 May 2018 03:52:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DD665295A6 for ; Fri, 25 May 2018 03:52:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DA9DD6B02CA; Thu, 24 May 2018 23:52:43 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D80AF6B02CC; Thu, 24 May 2018 23:52:43 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C97D26B02CD; Thu, 24 May 2018 23:52:43 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk0-f200.google.com (mail-qk0-f200.google.com [209.85.220.200]) by kanga.kvack.org (Postfix) with ESMTP id 9DBA66B02CA for ; Thu, 24 May 2018 23:52:43 -0400 (EDT) Received: by mail-qk0-f200.google.com with SMTP id z1-v6so2921785qki.10 for ; Thu, 24 May 2018 20:52:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:in-reply-to:references; bh=AvK4BOYzdgXLw3QxzHGdoIKyGfJxFO0kDJ842b4dVYs=; b=pNvbqxZ3T/uZAl4Fsa81zaTKJXnDL2kGRGnNHGV1SItVbXQJoSJVUY91k+zrtbewRF cS49ZvPhXJqRX4/KW4KJROgCl8jSd9UlhgIfzYVuvWpBiQnxIO5wb0AOftqdsGiki452 odkqMR+UUCR1O+MnYLmDDZzI7zhsSelnWYlAN8sSKtQfOdxDUhewAoX2zwwZMkAuyxEc 6Y97icOOWkkZMiwFcGD2VR23sbnz9phJkVlSl+nh0c7beCmsQKC0lFPD/SkYMH/m5YX+ SiNrpRinryjLGRGiQs/TOhxF4mQtcNDn+tzCYK6lT8CzJV3MQAx3p25VH4X0y5uB5ink EArg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: ALKqPwdZwC7F4yqx2Z0spx3sxQ4KyclfefBAewKUpQLDngiBeZFrR1Ny suayZRjU9R5wPCjR8D9MUWjQRXfo3fuE7n/XIRhzRXeu/oB1V9+/zr95LjWfiTTVlPy6ZTAAeSz OnKKFWweF9ws0EPNcVeYgmtN+IAedvbWMGPhgXipMEaTmstzChcj+8II7p3fRMGz3Og== X-Received: by 2002:a37:a001:: with SMTP id j1-v6mr548375qke.369.1527220363444; Thu, 24 May 2018 20:52:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI5WMu5ikh/WjK+bguZgAbSYOtbuCO4HKtLzP7sNzUugAN6NfcujY3iYjDB38BOqaAol4Mi X-Received: by 2002:a37:a001:: with SMTP id j1-v6mr548359qke.369.1527220362956; Thu, 24 May 2018 20:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527220362; cv=none; d=google.com; s=arc-20160816; b=MqD30svq2bqk6mJ0xS0IiJOolgZKcXvn+Tcp4LEkeDAJ04YBGfuA3RwfP7/Wm1/uYy 7ywPKu6CSeDyLrnFpiIgmVWTPtWpP3XHJUssCuJEVzAbayisG2zFu+NZgBofteHUzN8H AEjoSFlaw99+R+nmErDiGaFXqSaHGks0o7pjP+qbQ0EKwxfYnKO21Wh3jh8QxRDWWYMk FoYEHwr7UDLnK6NmpbsiQh4Wd3ijS8stPKyvMDrBb3/Nlthvwjkq4CE2vpbU2v68DTD6 0PFkFrHHj8W6872mgCfZgQCE23bK4w8U+I0Ts083l8Tv3HA92pEseUjGdAEq6fEzerPt gTMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=AvK4BOYzdgXLw3QxzHGdoIKyGfJxFO0kDJ842b4dVYs=; b=RVmI8l3eMBrgj9IMboeV4yrknOTr2q4cPC2PM30RFBagbPYdrXEDyR2/LD/++Mq+t2 6t4eVpoP9QSJZf3IQR7o0ILCtr7k4xPXjF+Ms3PzbeWZpKOye2cAq2YM1m0fC+0F7Z6O ID2cw8gCROGd6n1+csgAHpYUy6kdyVgXbox3/Rr39lsmtbOa970LWmtMFeYPqodN0+iI zjswkWw0hmKobPgo2SsmJzuSLqkorLh8jeBlU8NHIYzuODteZ1xogJYYO0noVFibsIfV AZjk1faFxhQiSie1CkaB9f46UL3n78595/JYUaouYx2kHRmlHvxpuhKKlm19djUUK+4n uLEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id c24-v6si11865998qtg.360.2018.05.24.20.52.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 May 2018 20:52:42 -0700 (PDT) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) client-ip=66.187.233.73; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=ming.lei@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 82DF24022414; Fri, 25 May 2018 03:52:42 +0000 (UTC) Received: from localhost (ovpn-12-30.pek2.redhat.com [10.72.12.30]) by smtp.corp.redhat.com (Postfix) with ESMTP id 788331006ED9; Fri, 25 May 2018 03:52:32 +0000 (UTC) From: Ming Lei To: Jens Axboe , Christoph Hellwig , Alexander Viro , Kent Overstreet Cc: David Sterba , Huang Ying , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , "Darrick J . Wong" , Coly Li , Filipe Manana , Ming Lei Subject: [RESEND PATCH V5 32/33] block: always define BIO_MAX_PAGES as 256 Date: Fri, 25 May 2018 11:46:20 +0800 Message-Id: <20180525034621.31147-33-ming.lei@redhat.com> In-Reply-To: <20180525034621.31147-1-ming.lei@redhat.com> References: <20180525034621.31147-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 25 May 2018 03:52:42 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.6]); Fri, 25 May 2018 03:52:42 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' 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: X-Virus-Scanned: ClamAV using ClamSMTP Now multipage bvec can cover CONFIG_THP_SWAP, so we don't need to increase BIO_MAX_PAGES for it. Signed-off-by: Ming Lei --- include/linux/bio.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index fc8a8238805e..839dddf81d09 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -38,15 +38,7 @@ #define BIO_BUG_ON #endif -#ifdef CONFIG_THP_SWAP -#if HPAGE_PMD_NR > 256 -#define BIO_MAX_PAGES HPAGE_PMD_NR -#else #define BIO_MAX_PAGES 256 -#endif -#else -#define BIO_MAX_PAGES 256 -#endif #define bio_prio(bio) (bio)->bi_ioprio #define bio_set_prio(bio, prio) ((bio)->bi_ioprio = prio)