From patchwork Wed Jun 27 12:45:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 10491459 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F28CC60325 for ; Wed, 27 Jun 2018 12:50:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E2FE928D94 for ; Wed, 27 Jun 2018 12:50:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E101728DA1; Wed, 27 Jun 2018 12:50:39 +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 67B1828E77 for ; Wed, 27 Jun 2018 12:50:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6B12E6B0294; Wed, 27 Jun 2018 08:50:38 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 65FEE6B0296; Wed, 27 Jun 2018 08:50:38 -0400 (EDT) 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 5500A6B0297; Wed, 27 Jun 2018 08:50:38 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id 2DD916B0294 for ; Wed, 27 Jun 2018 08:50:38 -0400 (EDT) Received: by mail-qt0-f197.google.com with SMTP id o68-v6so1895943qte.0 for ; Wed, 27 Jun 2018 05:50:38 -0700 (PDT) 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=lr8HzUjEptRFbDNBkba9OfDHv+B0ZrnBf3KocODTxD4=; b=CQg+W3M/V6Yo+TFCO/9BCAMfhBFygo1xq1ZqFJpFJnaa3q3rFaSt9WwA9MPGhoHFyF Ijgo3AkzvY7G8J0EdsvmnRkHoPqvtlU/yQItf73ihBgp5M9nHAMAnoQRgqA0FDr20kmj kI/2YvZNlZhhxPZzI1RLFyOImQwAijk+gHybMP0APr78lFo1o2YlqDsERJ1KH/4Bvlza lvXL8r+YGekNDiIFUyAIkfYtrcxjagtTrlu2rJW1a0PLk3qCFyE+9xrEjNJLLmLjukut LU1BuDdYNmj2ZSXGysIYkoEz2SsCLDaG2/KC2aNqN+dd9YNQ8Cl36GyrROvMAKJjx6q9 LLMw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 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: APt69E0cXDgKLp/a8ihxoW2UJTDXg0SmpPCCUircS/FEpevELNMOdGCg vONcmU/f2OMI5frNNmb3lC3R0EinBV6CKHBkcb/CWV6pYPd65eOTTYmI8/mmhH9wlsQVgYAi25N rLyvXVK4Cs2apWtvdsN7dndEZS2DcjeyOKtWgPK+/ljMxExem0drJq0U8aZ3G6CF3uw== X-Received: by 2002:ac8:2fc2:: with SMTP id m2-v6mr5180943qta.273.1530103837988; Wed, 27 Jun 2018 05:50:37 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd8q4Jvf4MEfABFoKccgcxaxnp7Yn++kMRrISwr00BAEVg5RVj9b4xlU4ES+treLzzK6I6j X-Received: by 2002:ac8:2fc2:: with SMTP id m2-v6mr5180921qta.273.1530103837380; Wed, 27 Jun 2018 05:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530103837; cv=none; d=google.com; s=arc-20160816; b=DldOrHmbMK/+MwGRMSixyf9+O6dGsTUjEW4UUl6VzA+Wwa+xOEkWINwkWcTAD6DQPt EfaOHvZL0GCYB8qglDPJ0YK3eMd2NBQ0y6nVQJ9nsX2aO2FSOJRpe0qMWNDAMLkwRmog iByjNyXulKpMqam6fE/JQCZ/qxK1l3uPwFv1KRkPrC3AOLGRjcxUjrtC8awfNsEwhSzz H7EBRgKuR/ZXN+PdO3ie3av2MWz+lUbY3/SJY++0kAJYy1nggdjGVflq4Nbvd63ipKDw /dpldyWSoZJKGOS4ifg6iZbU94UUjfxKS/mXDSOUwemLzzJuUqsDl3POZanJc8X2RAxA 3+kg== 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 :arc-authentication-results; bh=lr8HzUjEptRFbDNBkba9OfDHv+B0ZrnBf3KocODTxD4=; b=0TpWSjw4WZwBYdOISR4/72rzklQ8gwbMsHw7h+J6e8uEVDCfnBX5ZD+0cIRiXP0EYr EkjgNEdv3LuwImN2pJAVAT0fBpv7sSclftbaodOZpK5cU5lin2QzBjUJVUVMBsNdYSDZ qdozEwT6OsV+YsTB7WcYBsacn/IzMAgkacC3jp3PGIEd9gWg0x4eXqa1AmIGJlbsylx3 uLtuonzugRSBe5FKZiYRwyRELkuWMlbMtytXRImTtN0BYr3QbelF4koKMGcOho60LZg8 jKOzt5VdysEo5MGWHbRHd4rj5qSG90iS8ooEt2ZixAdMcdPcMZK/wZ/Y/FgCEoEYku12 C2Cw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 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 (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id 4-v6si309959qke.169.2018.06.27.05.50.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 27 Jun 2018 05:50:37 -0700 (PDT) Received-SPF: pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 as permitted sender) client-ip=66.187.233.73; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ming.lei@redhat.com designates 66.187.233.73 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.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F1F7D40704A7; Wed, 27 Jun 2018 12:50:36 +0000 (UTC) Received: from localhost (ovpn-12-44.pek2.redhat.com [10.72.12.44]) by smtp.corp.redhat.com (Postfix) with ESMTP id C23852026D5B; Wed, 27 Jun 2018 12:50:28 +0000 (UTC) From: Ming Lei To: Jens Axboe , Christoph Hellwig , Kent Overstreet Cc: David Sterba , Huang Ying , Mike Snitzer , linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Theodore Ts'o , "Darrick J . Wong" , Coly Li , Filipe Manana , Randy Dunlap , Ming Lei Subject: [PATCH V7 23/24] block: always define BIO_MAX_PAGES as 256 Date: Wed, 27 Jun 2018 20:45:47 +0800 Message-Id: <20180627124548.3456-24-ming.lei@redhat.com> In-Reply-To: <20180627124548.3456-1-ming.lei@redhat.com> References: <20180627124548.3456-1-ming.lei@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 27 Jun 2018 12:50:37 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 27 Jun 2018 12:50:37 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'ming.lei@redhat.com' RCPT:'' 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 multipage bvec can cover CONFIG_THP_SWAP, so we don't need to increase BIO_MAX_PAGES for it. 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 b44f9a40bb8b..3412947e42f2 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -38,15 +38,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)