From patchwork Wed Nov 21 03:23:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10691791 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D9B41923 for ; Wed, 21 Nov 2018 03:28:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 688122AB6F for ; Wed, 21 Nov 2018 03:28:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5C6362B4A2; Wed, 21 Nov 2018 03:28:50 +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 052312AB6F for ; Wed, 21 Nov 2018 03:28:50 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3203E6B23B3; Tue, 20 Nov 2018 22:28:49 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 2CF956B23B5; Tue, 20 Nov 2018 22:28:49 -0500 (EST) 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 1BE1B6B23B6; Tue, 20 Nov 2018 22:28:49 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by kanga.kvack.org (Postfix) with ESMTP id D9E4F6B23B3 for ; Tue, 20 Nov 2018 22:28:48 -0500 (EST) Received: by mail-qt1-f198.google.com with SMTP id t42so2165974qth.12 for ; Tue, 20 Nov 2018 19:28:48 -0800 (PST) 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=ccjdxmidawr//6DUiNVasZz3CTPbE58G5NElQttCP+E=; b=Hr1zjl+H63VEDQer9ARMBRSsYibUOlMIbUjhEZslFSweQLCk+ihp98BZHuInZmoQEY v3x6Jj1rXqnjCEzANBkIBYGrfVg0ShZFEIeNzbw2a1vPNvn7kKTrVrEnpqEHzpRUSICZ m8ypx/UcKcsbAAzhK/PuD6SK0sv4r9CLRypjFMYJBhBklWEk1H7lFe353hr9IULIuDpB xcBuIGlVaseOixe21gCPD+BjWcltqvtjhiZRLzl1a6Sq6uUy6wgzCbS986LOzXCTLute LhKMauPcYFwCdAz6lCA2GbIJQFj10ksOnQA7BWVVPBkSgowrXY+cz449MqSEAm4bNd99 1Sqg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 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: AGRZ1gJiyesl7yeJkvle0ihNjtAkevrJXQKH2pKzwCCAKrV7UUnrufJv CYR5JlDOjZAdYAN7JJoWRv2AFJ9jEjlwWKeq/bA1w9Slc/S79vPVgvvsQpNhnVcaViKILvVYXO4 hawIAONCnBOwJMCkaDgbR+mH3xgEeK0V7ISmI2m9LV5fF8mVtA+A/a51irrFTcrIx/g== X-Received: by 2002:ac8:1e84:: with SMTP id c4mr4369385qtm.181.1542770928646; Tue, 20 Nov 2018 19:28:48 -0800 (PST) X-Google-Smtp-Source: AJdET5cDqlafpCOnmM+Qdh458r7AQr+mkxvPImvfD8XHh4xet3gecO2f7fpNJWWypaARHlq1M1BV X-Received: by 2002:ac8:1e84:: with SMTP id c4mr4369364qtm.181.1542770928103; Tue, 20 Nov 2018 19:28:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542770928; cv=none; d=google.com; s=arc-20160816; b=npPub1cTHXJHYNTidXKsfnSbjkOJksp5iszNrgCetxhvJ15JODPhnUy43M9CgWvzf6 A3VHBthZcBFqNyo/r45yyoWBb1kow7TZ+WB9IDXBYeZK1N4rKXECeeU1i2LztxtrFJPU Pvjt5DmOvLwCg/4m6sLQPJ1NzNLnCrHi/dHc5eK/zx+/xLsc7rbPpXme2xTuZGmEbveg by9Y1AvwLvaMMHXLSh+NgUmCLtkuWAjYzylmvHpvae3xsuC5YB6DfBhLqzMxv8RBZGW/ YxGnUQEB/TMfi4uGr/4Hg/Xamn6X0FHNC81jiWYSjO5hy8PQjQaqPVTXhO/4JQQudiPh yMoA== 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; bh=ccjdxmidawr//6DUiNVasZz3CTPbE58G5NElQttCP+E=; b=YzWcnq/MEv7XMdsAROIZ3M/2Xsjr8L4Fkl+9YlnjrMQ5YToUH5mFLw40kqkZ7JKTqt XJtudfEOTKOJYud4bbrGtB2ldTZHpUJXWKzb1v1hyajLOvMDB7zPTbmopHaMEm9WtWmX qycgZI//shYCnjGlaxBeEkuUiqeM0yA7fS8KO8P6CfoNvavOZVR322DsOYlxtz3DivZr 3fkxc1NogbEChocS31TO5K7nbpVqcnU7tcgsXCPgN3kflSDTz5a9AclpwTMZWVQ2SpTD OT88UDFj4e3QoMylG3NHL+rnAYwi2tdS0g07OdchP1VYD1ixCuceHyxg4/rYrvFRJNta aeyg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 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 (mx1.redhat.com. [209.132.183.28]) by mx.google.com with ESMTPS id e25si11448732qvb.25.2018.11.20.19.28.47 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Nov 2018 19:28:48 -0800 (PST) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 209.132.183.28 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-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) 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 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)