Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1492905imu; Tue, 20 Nov 2018 19:30:15 -0800 (PST) X-Google-Smtp-Source: AJdET5fdYnQ4mLtbZLbPDLNoBBkQ4id2BE4X5kEWTfkpjaus33UnJVnSbO1RHulDxLhAhQhNjqQv X-Received: by 2002:a62:75d1:: with SMTP id q200mr5036611pfc.254.1542771015267; Tue, 20 Nov 2018 19:30:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542771015; cv=none; d=google.com; s=arc-20160816; b=pdgA4KRiKTEQyUtUYu3W//4A443ELF5MeJKVRNQXJ6rLvLhjpQEjLQmoMdZQ2sczub lagQeexjjp+chC90NE/wQAqtn+k29bm0sc3uJAa20z9nFytDU3TCW1AOU9kqd2Sr7KXa OzT4Ci5C2Z4sw5xZHAH/ce8H51yF97coMxftGRjFIT6JN32V2e7tdV8hPkhd1j7idmlJ ZRt5CSifCeUnUwfXi/nKwPGZQrT0oOmzZU7XbW7ibdM4ZzsVUjWqU30NOiS3Oxe/p8/p BEt7HklHQs08ChOjN7C3VuE00PH4bwBoINx4Htos2TdK0huG8ICEWU3uusqUO3gRoOrt GMEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=ccjdxmidawr//6DUiNVasZz3CTPbE58G5NElQttCP+E=; b=mnVrRlqNS1pFTH2Src766TtiuAPp4XTuZ5VzrimNKm22/fDSUCPMw0fu1l+9NjzUyw 1UcmMHRR7+jnR0QlQGCe81bVsAxB3FBDR5IXzlTzEAV3hp1RrXUA6IwryAwhHEjWcHyO e4C0BmVpOtfx3kFwdpdFlmGh3U+ln/vMgAFAj+pXn4cO+Au8M1oQ/3WwcXPTP6qga6bN MLSM9ZLHinYcmELzFRITMbA3GhrhDj2bEVRU4WXiH/3PJ970zoTjR7DlHhWIAuk8nYik X61JJ7F3Jed7OkRlszE28JUSJYf1N2B8Un8mF5S+eNt94JNB2CyyPUif+a7McuqaAVfG NpVQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n6-v6si45900752pla.245.2018.11.20.19.30.00; Tue, 20 Nov 2018 19:30:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728356AbeKUOBT (ORCPT + 99 others); Wed, 21 Nov 2018 09:01:19 -0500 Received: from mx1.redhat.com ([209.132.183.28]:43026 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727004AbeKUOBS (ORCPT ); Wed, 21 Nov 2018 09:01:18 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 013083082E4D; Wed, 21 Nov 2018 03:28:47 +0000 (UTC) Received: from localhost (ovpn-8-21.pek2.redhat.com [10.72.8.21]) by smtp.corp.redhat.com (Postfix) with ESMTP id C40FF7E383; Wed, 21 Nov 2018 03:28:32 +0000 (UTC) From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , Omar Sandoval , Sagi Grimberg , Dave Chinner , Kent Overstreet , Mike Snitzer , dm-devel@redhat.com, Alexander Viro , linux-fsdevel@vger.kernel.org, Shaohua Li , linux-raid@vger.kernel.org, David Sterba , linux-btrfs@vger.kernel.org, "Darrick J . Wong" , linux-xfs@vger.kernel.org, Gao Xiang , Christoph Hellwig , linux-ext4@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Boaz Harrosh , Bob Peterson , cluster-devel@redhat.com, Ming Lei Subject: [PATCH V11 16/19] block: always define BIO_MAX_PAGES as 256 Date: Wed, 21 Nov 2018 11:23:24 +0800 Message-Id: <20181121032327.8434-17-ming.lei@redhat.com> In-Reply-To: <20181121032327.8434-1-ming.lei@redhat.com> References: <20181121032327.8434-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 21 Nov 2018 03:28:47 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now multi-page bvec can cover CONFIG_THP_SWAP, so we don't need to increase BIO_MAX_PAGES for it. CONFIG_THP_SWAP needs to split one THP into normal pages and adds them all to one bio. With multipage-bvec, it just takes one bvec to hold them all. Reviewed-by: Christoph Hellwig 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 7edad188568a..e5b975fa0558 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -34,15 +34,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) -- 2.9.5