From patchwork Fri Jan 11 11:01:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10757801 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 4AB5C14E5 for ; Fri, 11 Jan 2019 11:06:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3BD4129C0E for ; Fri, 11 Jan 2019 11:06:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2EA7529C15; Fri, 11 Jan 2019 11:06:09 +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 C4AA129C0E for ; Fri, 11 Jan 2019 11:06:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A53788E0012; Fri, 11 Jan 2019 06:06:07 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 9D8FE8E0001; Fri, 11 Jan 2019 06:06:07 -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 8A4988E0012; Fri, 11 Jan 2019 06:06:07 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by kanga.kvack.org (Postfix) with ESMTP id 5EF348E0001 for ; Fri, 11 Jan 2019 06:06:07 -0500 (EST) Received: by mail-qt1-f197.google.com with SMTP id w18so15947089qts.8 for ; Fri, 11 Jan 2019 03:06:07 -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=ZTTEI184zjp8LLvTWvrd6TUN+5CgfMPjY9NTQhNyF9o=; b=rGAx54hwI6ZRyY122DvM08yyo4uOHGmk57cBfsEZaC6Z+yVblDwTsYpnLqBbhgLMZO jrskdpUfjqBor91kn5IQ6K5029rxxaQzrYZ67ixk+twLvSBcGcmVlpGoYjMABsyyX19a 0rP0rtj5+fLnndQWLDhvqHrZ0t1QR+vCXx3dvNI2yVOVx7mXo/GlPyAcBQuNGEinT/Y/ E8x0xFXYudCWr7XUlthgkW+hD24e/4wAu3srq13cKDIPZ7UPI/L0CHMm6BK6zk6Rsw7e /EEY8QL/3COPbyU5eDqYzBqKS5121lpyg+QG4bw9YL2kOSm0bINbAXxcFZgcNfyeP9Mz vfVg== 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: AJcUukd5XPlG/2cTiySv4MmuPfZL/sG4xudQw5H1FYFewPRia6ROlmf0 YFcPd8CVYvgA4pwxr7OpBHdBgFGb7OUBP3i5GU7Hu/BBJ41Lf+AzoK/7EG1CSexbKLik1ok+Dvi WmHOOURTJmIxJOSxTHS4q61MVNm1z41VGQQs9OA8Uw63KJFCaVmCAHVNbcLcQHU82Gg== X-Received: by 2002:a0c:e789:: with SMTP id x9mr12497332qvn.245.1547204767170; Fri, 11 Jan 2019 03:06:07 -0800 (PST) X-Google-Smtp-Source: ALg8bN7sTwjMIPcvvMJCAV4qU2j60FelWm6Zf9+v67i3VPtyWRaNi3uW8g6rvXmZgdwED4tB4VvL X-Received: by 2002:a0c:e789:: with SMTP id x9mr12497301qvn.245.1547204766632; Fri, 11 Jan 2019 03:06:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547204766; cv=none; d=google.com; s=arc-20160816; b=eUlFJWt1/r3/PwnDg+AM3qRbJfhuAR8AmZb/esTrEqzbktiZJvtaEgyb40gasUmHUx FJKpIkOjkG4O9GnTzfYU9W6SckJNSVRQlvcAoZBRlCNPPIBW17A80ao2kiRX7zSz8ROi wnQMRr4fQkA/YHoemeAoLEQ8KH8XTja6V3UdWPs5VU8CWa+XoBePR/AMlohef7Ho/2ru e2EI5cwOhnOU1WPlUey5YGic3kFuTVJ35rNdnLKAslIdiQK76HQnxd8EtSpCIXuDODV8 6WowgxNwInk6O7gFZm2RxvI0S0fq8glw7cIwqCSNNwSiwOZ1sW4C7uzN0ImTO4+pAJRk pITA== 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=ZTTEI184zjp8LLvTWvrd6TUN+5CgfMPjY9NTQhNyF9o=; b=T+C0VO1k/DteAMJZJHihfjIbryUqJb41YZUWkBRySj0dJN/MUu72jzgnI/q0B4q4pT be3Q8kfpkiSVBxxF08XcFM3E0ueIJ++qiZWJMg/SgP6hCfqptxwxdrP1kHuCqXWyHwyt PrdKI9rsTsCFGMgCus9LzsOuuVYIx08Z+pXWl35/TbT5PhAvuk2eWjqVnhBGcxX+10T6 5+zUScHwpXIpC+FpXavoarFT+6j7Qt/a1szwpA5s67Ct4nIbfwJMUavHweejAAWQrK77 0oM3ATHE/O4IyfoN3e1fWT/AKswQHOtHWEii2Pbn0nVF7HPL3TplrLRAxunvIbFjl0HG 3ghA== 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 h13si278132qtb.233.2019.01.11.03.06.06 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 Jan 2019 03:06:06 -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-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 74A71C0C8CF2; Fri, 11 Jan 2019 11:06:05 +0000 (UTC) Received: from localhost (ovpn-8-28.pek2.redhat.com [10.72.8.28]) by smtp.corp.redhat.com (Postfix) with ESMTP id 77C0827CB2; Fri, 11 Jan 2019 11:06:04 +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, 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 V13 16/19] block: always define BIO_MAX_PAGES as 256 Date: Fri, 11 Jan 2019 19:01:24 +0800 Message-Id: <20190111110127.21664-17-ming.lei@redhat.com> In-Reply-To: <20190111110127.21664-1-ming.lei@redhat.com> References: <20190111110127.21664-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 11 Jan 2019 11:06:05 +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: Omar Sandoval 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 1ece9f30294b..54ef81f11f83 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)