From patchwork Thu Aug 5 19:02:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zi Yan X-Patchwork-Id: 12421871 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1EF36C43216 for ; Thu, 5 Aug 2021 19:04:04 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id B61C961186 for ; Thu, 5 Aug 2021 19:04:03 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org B61C961186 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=sent.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id BE1E66B0080; Thu, 5 Aug 2021 15:03:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B93036B0081; Thu, 5 Aug 2021 15:03:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A32CC8D0001; Thu, 5 Aug 2021 15:03:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0228.hostedemail.com [216.40.44.228]) by kanga.kvack.org (Postfix) with ESMTP id 82DF46B0080 for ; Thu, 5 Aug 2021 15:03:52 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 3066F269CA for ; Thu, 5 Aug 2021 19:03:52 +0000 (UTC) X-FDA: 78441951504.09.10F18C6 Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by imf30.hostedemail.com (Postfix) with ESMTP id D5B1AE003077 for ; Thu, 5 Aug 2021 19:03:51 +0000 (UTC) Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 83F4A5810B7; Thu, 5 Aug 2021 15:03:51 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 05 Aug 2021 15:03:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sent.com; h=from :to:cc:subject:date:message-id:in-reply-to:references:reply-to :mime-version:content-transfer-encoding; s=fm1; bh=zNBa+DPw6skCL 5zqb415g/XSwtRXkYRjfljqWc0rqOw=; b=DyQb67WDvRtWM6HaUooUM/LJ7FBVe RHKFGNkJpgMc/hVEhEU3bBY0j9e1ACpLPdzYhMBgcjDe25DJVAzXtC8OyYQaCVVT DVkY8uIRXHprEmZd7qBlwTwWuaxBZ9hOYHN4GMeCh1CiCofOD28h/6oouXhqIR0t oKln8pn7sD+jD8rKJ0OfZcRP17juq9szZlAFNHgLyTc/QAno4D+VnlxhSsuynNfP 61sbW9SZYU5psQ4GG81DYucrG+Xv1iJYadVgCmDdHfkO6F3fiRucb/vyijDk16O9 /Tu4nUObFASN79yNgjfLeDeMHRAtJC2KV1GiUeMazMZWkFNAisJysmBTw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:reply-to:subject :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; bh=zNBa+DPw6skCL5zqb415g/XSwtRXkYRjfljqWc0rqOw=; b=gWQXO1i0 jN0W7VaDRO9ZJs7svTKOs6Zt3cVW8ykYAN5L20lmCsOwVLSyKKEZwcwAy8VLeDO+ +cKpfta9nOpdlS3fPnazuUW3DIx4T86hKG9WnNFqjnCwKTmzfFsvE9oh/Mdk21IY ZVbWKhhb5FA53N0Ec0CWeZHZKCmTAAiFT07RnyvlxwVi6mE/6AZGO8VqkOWJuOan ijipS8ZISTZ+UgBOT8KfSFZxVWMUbObBRGAXGyM93Vp8IG6cNc/lcud6npqT4vDF sQHBgCvQgM9uEJk8sIkfHmI/yaEFNhrihPBkIuGmwTxRC6bG58BsFou2qiW9cT3Z UG97Hfi+X2S+MA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddrieelgdduvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvufffkffojghfrhgggfestdhqredtredttdenucfhrhhomhepkghiucgj rghnuceoiihirdihrghnsehsvghnthdrtghomheqnecuggftrfgrthhtvghrnhepieejue dvueduuefhgefhheeiuedvtedvuefgieegveetueeiueehtdegudehfeelnecuvehluhhs thgvrhfuihiivgepudenucfrrghrrghmpehmrghilhhfrhhomhepiihirdihrghnsehsvg hnthdrtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 5 Aug 2021 15:03:50 -0400 (EDT) From: Zi Yan To: David Hildenbrand , linux-mm@kvack.org Cc: Matthew Wilcox , Vlastimil Babka , "Kirill A . Shutemov" , Mike Kravetz , Michal Hocko , John Hubbard , linux-kernel@vger.kernel.org, Zi Yan , Mike Rapoport , Oscar Salvador , Ying Chen , Feng Zhou , linux-fsdevel@vger.kernel.org Subject: [RFC PATCH 08/15] fs: proc: use PAGES_PER_SECTION for page offline checking period. Date: Thu, 5 Aug 2021 15:02:46 -0400 Message-Id: <20210805190253.2795604-9-zi.yan@sent.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210805190253.2795604-1-zi.yan@sent.com> References: <20210805190253.2795604-1-zi.yan@sent.com> Reply-To: Zi Yan MIME-Version: 1.0 X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: D5B1AE003077 Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=sent.com header.s=fm1 header.b=DyQb67WD; dkim=pass header.d=messagingengine.com header.s=fm3 header.b=gWQXO1i0; dmarc=pass (policy=none) header.from=sent.com; spf=pass (imf30.hostedemail.com: domain of zi.yan@sent.com designates 66.111.4.229 as permitted sender) smtp.mailfrom=zi.yan@sent.com X-Stat-Signature: tgwzzzzgtcskigiasgmadzybctgucjz3 X-HE-Tag: 1628190231-782663 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: From: Zi Yan It keeps the existing behavior after MAX_ORDER is increased beyond a section size. Signed-off-by: Zi Yan Cc: Mike Rapoport Cc: David Hildenbrand Cc: Oscar Salvador Cc: Ying Chen Cc: Feng Zhou Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org --- fs/proc/kcore.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/proc/kcore.c b/fs/proc/kcore.c index 3f148759a5fd..77b7ba48fb44 100644 --- a/fs/proc/kcore.c +++ b/fs/proc/kcore.c @@ -486,7 +486,7 @@ read_kcore(struct file *file, char __user *buffer, size_t buflen, loff_t *fpos) } } - if (page_offline_frozen++ % MAX_ORDER_NR_PAGES == 0) { + if (page_offline_frozen++ % PAGES_PER_SECTION == 0) { page_offline_thaw(); cond_resched(); page_offline_freeze();