From patchwork Thu Nov 15 08:53:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10683871 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 2195514D6 for ; Thu, 15 Nov 2018 08:57:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0D70D29B7E for ; Thu, 15 Nov 2018 08:57:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 00B482B678; Thu, 15 Nov 2018 08:57:34 +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=unavailable 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 9213029B7E for ; Thu, 15 Nov 2018 08:57:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 953326B0289; Thu, 15 Nov 2018 03:57:33 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 8D98F6B028A; Thu, 15 Nov 2018 03:57:33 -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 7A40F6B028B; Thu, 15 Nov 2018 03:57:33 -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 4BD076B0289 for ; Thu, 15 Nov 2018 03:57:33 -0500 (EST) Received: by mail-qk1-f200.google.com with SMTP id z126so43528254qka.10 for ; Thu, 15 Nov 2018 00:57:33 -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=IuzoizmNxooh9FMOsI6khiQZjrW/+dloH4RuOnNRpso=; b=PuRQyuE86Hk+3A42BJCrrmmEX0QVH+UKSP+MdoTbNOANT3Zuc6379CV1WBoZhZgU0m go3ZuyY9C0IgNMUUyD60UXcuYWWAgtpte8h3LIb07NeDP71rHi2pymWoEezyQ4AU1iDQ nQgu6XwytswrjHgF8Gw9G5K+xf8nVziJT64yYAWAZxQPj/UU1Wd7y9iQEK9DS2EXrC2N U8y9YyFV3WLrYQe0qU9ZhEdGHiu4kl1LNS2E/B7i/kfaoz9fEWGSZyQ+AFWL7Z4M/YHR TbvrnY/71pLpssAfpK33+wRVFEdZiIifRHzi/V00rsV70yFAGz6iUbv1SzeNgljO1elV L+DA== 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: AGRZ1gIw8kLbKe8Z5vBUfabaTvWdbZ/xBbPJ8oiPaWpxtoOhzwRQ8bza EIByRP3ckeO5E/sNhUlEj779xWJppOwW2i+OQ7v30/WCgUmqBc7Qc2E6dLzbrMtIOTksA5GhP2P iFcH2ihlzRJRN/0CEx35Ikh+ZdMRbJQB7PkzIePt6wZ+XMlhPlLne1k20zI4h9tu1qg== X-Received: by 2002:a0c:91e8:: with SMTP id r37mr5222914qvr.141.1542272253085; Thu, 15 Nov 2018 00:57:33 -0800 (PST) X-Google-Smtp-Source: AJdET5ebfvxqn90hi9JszHiQJTIStdBjl0+EFF/01PSkA7pMPFeYFqJR7vxoGUNYkjaxKJvb2wqG X-Received: by 2002:a0c:91e8:: with SMTP id r37mr5222896qvr.141.1542272252631; Thu, 15 Nov 2018 00:57:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542272252; cv=none; d=google.com; s=arc-20160816; b=otklEqbGhlOVOZJnmlub+tsqa3GzvODNkTnFTeMHXNWoFqYxP3S7cKt9ED5CFg6SKd 99vwe1isGAzeUwVASwA/kTk44HEhPy4ByUaeITUUGUFWnVzrcs3f6QomR6UITRmHAmN7 2m0JQlZl7sz6H1+2GEkeKq6z98Q7jP4mJdgnzuvY4ZHAANOdpGAl1xfUqKUDWGmNhS8C 4YHNK5BhMZOLRt1pVFJcsH1up39ExZWSe5bmjcrD3WL+ste0VyjLirXkZ+zwxBcJidkK BH/TT+oPdafdk1wachRJ0+iRqwRYxgm1fctlviOPYACXMJht7pFc9gYfSirUNwNSngS8 thTw== 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=IuzoizmNxooh9FMOsI6khiQZjrW/+dloH4RuOnNRpso=; b=FGbrhv8ylUapqDGzHlmieArt/h32zfJE9vRwN8s/I+ZwbKqOVhyoUnI7Rr48b10iMY ggh1tiALAuejYScuvXlYCmEOA32mIY5U9APekZp1KI7oQpwhwbJEmuottC7foMudx2M6 k9HdjkxYwcQooR8mDfLkKcLnwvZruxyzkH+3/tlWkVbsb/v1EtSWX/my8q8v6Lz3dOuf WCSBnRKg2g1bNBsW31O618y3lgHBMP8nQ3f0ltb8EhPppQz9tLguiHOAEKd/ivjCeIni uFZ3iwhUKRQdJtGcHIYgKXYclda+AhzyR4bjPuxmsFT+PQ9jLFdstuck+W7IyN7tc5o+ W6lQ== 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 m9si1446341qtp.201.2018.11.15.00.57.32 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Nov 2018 00:57:32 -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-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93CA33680A; Thu, 15 Nov 2018 08:57:31 +0000 (UTC) Received: from localhost (ovpn-8-23.pek2.redhat.com [10.72.8.23]) by smtp.corp.redhat.com (Postfix) with ESMTP id F1E851054FDC; Thu, 15 Nov 2018 08:57:13 +0000 (UTC) From: Ming Lei To: Jens Axboe Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Ming Lei , Dave Chinner , Kent Overstreet , Mike Snitzer , dm-devel@redhat.com, Alexander Viro , linux-fsdevel@vger.kernel.org, Shaohua Li , linux-raid@vger.kernel.org, linux-erofs@lists.ozlabs.org, David Sterba , linux-btrfs@vger.kernel.org, "Darrick J . Wong" , linux-xfs@vger.kernel.org, Gao Xiang , Christoph Hellwig , Theodore Ts'o , linux-ext4@vger.kernel.org, Coly Li , linux-bcache@vger.kernel.org, Boaz Harrosh , Bob Peterson , cluster-devel@redhat.com Subject: [PATCH V10 15/19] block: always define BIO_MAX_PAGES as 256 Date: Thu, 15 Nov 2018 16:53:02 +0800 Message-Id: <20181115085306.9910-16-ming.lei@redhat.com> In-Reply-To: <20181115085306.9910-1-ming.lei@redhat.com> References: <20181115085306.9910-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Thu, 15 Nov 2018 08:57:31 +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. Cc: Dave Chinner Cc: Kent Overstreet Cc: Mike Snitzer Cc: dm-devel@redhat.com Cc: Alexander Viro Cc: linux-fsdevel@vger.kernel.org Cc: Shaohua Li Cc: linux-raid@vger.kernel.org Cc: linux-erofs@lists.ozlabs.org Cc: David Sterba Cc: linux-btrfs@vger.kernel.org Cc: Darrick J. Wong Cc: linux-xfs@vger.kernel.org Cc: Gao Xiang Cc: Christoph Hellwig Cc: Theodore Ts'o Cc: linux-ext4@vger.kernel.org Cc: Coly Li Cc: linux-bcache@vger.kernel.org Cc: Boaz Harrosh Cc: Bob Peterson Cc: cluster-devel@redhat.com Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig --- include/linux/bio.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index 5040e9a2eb09..277921ad42e7 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)