Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5176834imu; Sun, 25 Nov 2018 18:23:23 -0800 (PST) X-Google-Smtp-Source: AFSGD/XfoYWqFl0Zh1GimzWMth9+D8urXQr3d+r1T1aCO6EFzbxN987cdSdlwKZ4ODu4Gwb+/ExX X-Received: by 2002:a65:4ccb:: with SMTP id n11mr23431201pgt.257.1543199003458; Sun, 25 Nov 2018 18:23:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543199003; cv=none; d=google.com; s=arc-20160816; b=uhhIHr6I1rPh6+dknwXu4P5VlZYmruMGstn4E1TZPPFJJ2M4STCkOBPZAQHyeW99mn pPdXbs2pGWLvnGuPNkTP9CnNQsz4ExFNJQwq2XX/mAsMuKVw3nek4J8I9G2pznZavVG/ XgYcEJUs5N1Rw9t4aqbt69vy8lxLKWUqT3gDwu0fejtgWA0jIMCprHBxpUTuvtbE4Tav w6JzoIuenVIHCPxQl96E/yt6Nz8AEEMbaCj+xi4g+op+v9X96B9OyYvepkQ2LAMXzEXd Sr1WZtejzRCNT/gfOc8aKj/tv39n/LIzxxBjJnCEm3WTcaEWSt4IbiU9+WSPv6MjNt28 TZGw== 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=eKGJRdA+xrnSQcEt1FKMjp3+puyEwgRgYmeQMjJwbXA=; b=ljjCZTOrmFgPBlt+MeA/bQPAGgoGnOPqz2YmbViBtp4g8kTTO1LDn7I+nphMgCVeS3 o5v7pwCG35YG8AXKhEAo2xiG8xuK8TQZ51owy4apOeNWOgZPUVU2rG8UUa6GuGBzCpFj dXwbjFNFlC+4KJz56P9qqFqpUsdfj4KWQssHRlpRbA9k5g2GcTWS6nSAYCMB9o4CtaCw QwyLIWLeiQicLpIfbyDtos3j8QdgJuqY6Gx8v59aYuSKDXR54ss551Mb6fsbVDblUjov Yu5bLyike6QSKrz1d5wzeuX9Gjo3wRkAQj4HlY5wyrNNsUCcBFDvlHua7LPxreIICzFP 10zA== 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 be9si9830757plb.143.2018.11.25.18.23.08; Sun, 25 Nov 2018 18:23:23 -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 S1726859AbeKZNNl (ORCPT + 99 others); Mon, 26 Nov 2018 08:13:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36056 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726101AbeKZNNk (ORCPT ); Mon, 26 Nov 2018 08:13:40 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 584B1309B6D4; Mon, 26 Nov 2018 02:21:04 +0000 (UTC) Received: from localhost (ovpn-8-19.pek2.redhat.com [10.72.8.19]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6EC0218A5E; Mon, 26 Nov 2018 02:20:51 +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 V12 17/20] block: always define BIO_MAX_PAGES as 256 Date: Mon, 26 Nov 2018 10:17:17 +0800 Message-Id: <20181126021720.19471-18-ming.lei@redhat.com> In-Reply-To: <20181126021720.19471-1-ming.lei@redhat.com> References: <20181126021720.19471-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Mon, 26 Nov 2018 02:21:04 +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 5505f74aef8b..7be48c55b14a 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