From patchwork Mon Nov 26 02:17:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10697453 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 0A0491591 for ; Mon, 26 Nov 2018 02:21:08 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB98329A6A for ; Mon, 26 Nov 2018 02:21:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DF6E029A8E; Mon, 26 Nov 2018 02:21:07 +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 7F5D129A8A for ; Mon, 26 Nov 2018 02:21:07 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 8F8696B3F89; Sun, 25 Nov 2018 21:21:06 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8CE936B3F8A; Sun, 25 Nov 2018 21:21:06 -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 7BEBA6B3F8B; Sun, 25 Nov 2018 21:21:06 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by kanga.kvack.org (Postfix) with ESMTP id 51B706B3F89 for ; Sun, 25 Nov 2018 21:21:06 -0500 (EST) Received: by mail-qk1-f200.google.com with SMTP id s19so18146768qke.20 for ; Sun, 25 Nov 2018 18:21:06 -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=eKGJRdA+xrnSQcEt1FKMjp3+puyEwgRgYmeQMjJwbXA=; b=RaMJZgiDfh+H6MAUHWbrVK2b7jYYKKDk9JINbEJBsmbGT1rfZJ15uD6Xk4+BwDDZj5 RfVd1iyc0MOHXm6xAGERJC+saMGiWjhq1NkM6EIlOtnEXDts8omU9GzDSVMm/hb2iLz5 1pGnT7Ihi2kWGV0MCbrqtdBmfEDEOgvuwbA5rRV6YEqfP+ktJoKMlU/gVrQg1SEQjG0E b5kS+1PRNkWv+2WMl4GRxL9yTf9I0V0lWKh95nTEGRYEsGq0gT/MjNwEOcP0hKLRB4hD 3pt+tYADesT3xjTee9vQtKLEN3PpQQbs51/Uy/myqk1cKNnDq1cPskdz0MBBWsP4iJI/ MRnw== 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: AA+aEWYF95vVAMcK8Pqt5aWxB55UShJUMsrRkQC/IkyMQomD04NyLIf3 YBPn5jvI9ucY6BFsOk9KrW3J+pr97a4OxzYquHqqv7Wv1ukSCYQBYnG5mkv5zO5X9wChxS/iaVC APcknmR2zH+mTg6lYTbx/jQ/gwc3xvKm3Gqdr95yJvvddh97H7hr/doUUzR0rOUr9IA== X-Received: by 2002:a0c:9d81:: with SMTP id s1mr24015204qvd.82.1543198866119; Sun, 25 Nov 2018 18:21:06 -0800 (PST) X-Google-Smtp-Source: AFSGD/UkgwF/yMxuTznVAEurwz4fcDfrkm2c5Gy6l4ay6pkUjsUYQcFlRrj4rZAjlUp3nsSaBvgB X-Received: by 2002:a0c:9d81:: with SMTP id s1mr24015186qvd.82.1543198865568; Sun, 25 Nov 2018 18:21:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1543198865; cv=none; d=google.com; s=arc-20160816; b=O/ckevLzRu5ArMEBLGtJerGvstcrENpnNifMPE+AJXg/zDs0uY4b0h4OpUf/RJZu2H sYy6yeG668P3Y5yEt4g3UCQ63kVdBhdJ60jFd1I6gcGb81aCKlrCedKP72owKKtYPNZL m4mUjnqS1dqmQqfcpluN8BfC8eYxMPUtwCbOVaiTozNFTwWvO7tIe41F3ka8vFAZ5vhW yjv01X6zF3hSt35e7/r85nghhwNYdSSVVyiCsaNkMwn+r8kyBel+9PMz9H2slC/5iuLe VDYCVhwicZgcdqrdLMAUXL2h8DqAsEcwCmEwBDCqBpB416KsZ/IbbzWzg6d63m7as8vg TAdQ== 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=eKGJRdA+xrnSQcEt1FKMjp3+puyEwgRgYmeQMjJwbXA=; b=YCnpIZcCRP2MYgH6UbhnDfT6rNxI84mXF5c1hyMAEw2lUTckOAxDplDyMLJCgd3veq V8Mm15WQXmvQ28Uj48vv00UXnf08fi9+jvSJEHqscqwA1lWgKpdHrN1+kKW2z/+b5ZoJ pRPXNnV8zsdMVlrEQUSImKePA8Svp2QHF3VuBAIjOMz4pE2gSJk6+1r3Ap6SdQyXAyrM c3TrnRwlVvMQz7XPddUimsoj3x6V0zR0WOoYbCIip2sam0bRBuXquzVaqh6ZB17Bt+v7 XFqVX+E31uWZMbN2U+1zhogp5uWNgGHgq6+IZ1VQoofYdasV/HcztF7ba8sT8jPpvajt NpKA== 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 x83si1143550qka.105.2018.11.25.18.21.05 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Nov 2018 18:21:05 -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-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) 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 Reviewed-by: Omar Sandoval --- 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)