Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp1191672pxt; Sat, 7 Aug 2021 03:34:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhhbwCyZLmHi+UGeaqUv6/WFObr6wUsdEtx84KOBMl3usSVU0vmQfQu1UOoQgj/7sf+vjo X-Received: by 2002:a05:6402:2073:: with SMTP id bd19mr17796225edb.262.1628332455799; Sat, 07 Aug 2021 03:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628332455; cv=none; d=google.com; s=arc-20160816; b=YqgCJSSWwzNwuLc5C/RzmiDAIb9mttTpja5vbHb12wRr+imply+jWOrMkD4jeRMDlf 4ppRH+LcE1rVdWHCq/6FDrwQOoP8uomPi6ABRhyxXzg9xyCslMVKR4XfgYu1L6mXxbAI JFueWe8mIJE8Si4TjzFVO6+t1PdWU4B1/GwHdPl67RtA63r+TuFePn/BDEyNZf3voV6a uvvoWECRULb9IYaQ3t0WOmZLdHxaynKLttpjvb2lL/ODP0TE6ll7CrhwWAaL1w/Dowu3 aXn9IjfjhPhDvqAdgD7p+UjZ+mjS7BlNAQ7Gf+cGL0rJojyOb31z7UGGK5qtVoothqbi 8fFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=c1i6559yBnBr2uWQOLk+6IvTOt3SN4FYvzMJJfeyT4M=; b=0kXPKWXFMrJpVnqR/4N7F9bhODsDVZkZ4yEW2BsENNtg2RzfynPioEJ+flWlpRdMZb khQiWBNX6dLCbJ+i6tf6gdmsIXoeeaz/NOsfhp3BCf/8YsY/x+/V1mdHZ1Ktt0BGLwvn jjqPB3Zd0OVrRrNGv1vwwn4KpYegFI0P/E32Qq2DdJK1oSZgVW5l1WDLsGfWM6ezpMEn bijeF8KVdLnmystnAcpXzlwQrXHIHMfG5+qhJiraS2WJuoZXQL5p/JI4ZA/6lHoK9Ila dRVMT+fI+Z/jiFAnPw0yAtMNUPCrrkDPFTE/Wm1JITA542JwhlOwoSmjRdEf9tb5ps/r AbUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fsKTwecZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q6si12316146edj.487.2021.08.07.03.33.52; Sat, 07 Aug 2021 03:34:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=fsKTwecZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231899AbhHGKct (ORCPT + 99 others); Sat, 7 Aug 2021 06:32:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:60826 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231687AbhHGKc3 (ORCPT ); Sat, 7 Aug 2021 06:32:29 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 18487610FC; Sat, 7 Aug 2021 10:32:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628332329; bh=q0JbSC4fX4Crhi1HrqSNaN67de1iCkzSUaCVowYclWc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fsKTwecZe161gdAJQQnyQfzWRCWKtSI17t3EW2r28Gew517Y3JIG85wSBnFhNDI3r yGBQpyi7/ih3s7Q+f6DT0xIKDfvkzFbjVbBY1WK/mbWYGJRxJlsh1y9LX+FbBh46eV JYiIs0+AXJ/mjkz1PkHvHD7P5i2Wc3h8ZZeelre82v6V3CC02Rqs7WmF2gIZ/IVtuw zxAknc/fQcFuL0DLvtfzYQiaYcoRw1xmG91FwgwYzfzPa2zb9zFs777Tla0VmvJ1WT cXAViWgi2TVIv/pUNGCJZmG8JasYImcSxG/g01QJcscEsR0FzAKD8eTLbclBkET1uh xGUmkqO6QNU9Q== Date: Sat, 7 Aug 2021 13:32:00 +0300 From: Mike Rapoport To: Zi Yan Cc: David Hildenbrand , linux-mm@kvack.org, Matthew Wilcox , Vlastimil Babka , "Kirill A . Shutemov" , Mike Kravetz , Michal Hocko , John Hubbard , linux-kernel@vger.kernel.org, Oscar Salvador , Ying Chen , Feng Zhou , linux-fsdevel@vger.kernel.org Subject: Re: [RFC PATCH 08/15] fs: proc: use PAGES_PER_SECTION for page offline checking period. Message-ID: References: <20210805190253.2795604-1-zi.yan@sent.com> <20210805190253.2795604-9-zi.yan@sent.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210805190253.2795604-9-zi.yan@sent.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 05, 2021 at 03:02:46PM -0400, Zi Yan wrote: > 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) { The behavior changes here. E.g. with default configuration on x86 instead of cond_resched() every 2M we get cond_resched() every 128M. I'm not saying it's wrong but at least it deserves an explanation why. > page_offline_thaw(); > cond_resched(); > page_offline_freeze(); > -- > 2.30.2 > -- Sincerely yours, Mike.