linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Zi Yan <ziy@nvidia.com>, linux-mm@kvack.org
Cc: Matthew Wilcox <willy@infradead.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	"Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>,
	Mike Kravetz <mike.kravetz@oracle.com>,
	John Hubbard <jhubbard@nvidia.com>,
	Yang Shi <shy828301@gmail.com>,
	David Rientjes <rientjes@google.com>,
	James Houghton <jthoughton@google.com>,
	Mike Rapoport <rppt@kernel.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v2 06/12] fs: proc: use pageblock_nr_pages for reschedule period in read_kcore()
Date: Tue, 23 Aug 2022 12:36:15 +0200	[thread overview]
Message-ID: <30dd7d1f-df39-ad89-94aa-d1562b84fa8b@redhat.com> (raw)
In-Reply-To: <20220811231643.1012912-7-zi.yan@sent.com>

On 12.08.22 01:16, Zi Yan wrote:
> From: Zi Yan <ziy@nvidia.com>
> 
> MAX_ORDER_NR_PAGES can be increased when it becomes a boot time parameter
> in later commits. To make sure read_kcore() reschedule its work in a
> constant period, use pageblock_nr_pages instead for reschedule period,
> since pageblock_nr_pages is a constant and either the same or half of
> MAX_ORDER_NR_PAGES.
> 
> Signed-off-by: Zi Yan <ziy@nvidia.com>
> Cc: Mike Rapoport <rppt@kernel.org>
> Cc: David Hildenbrand <david@redhat.com>
> Cc: Oscar Salvador <osalvador@suse.de>
> Cc: Ying Chen <chenying.kernel@bytedance.com>
> Cc: Feng Zhou <zhoufeng.zf@bytedance.com>
> 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 dff921f7ca33..7dc09d211b48 100644
> --- a/fs/proc/kcore.c
> +++ b/fs/proc/kcore.c
> @@ -491,7 +491,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++ % pageblock_nr_pages == 0) {
>  			page_offline_thaw();
>  			cond_resched();
>  			page_offline_freeze();

Yeah, the exact number doesn't actually matter here.

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Thanks,

David / dhildenb



  reply	other threads:[~2022-08-23 10:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 23:16 [RFC PATCH v2 00/12] Make MAX_ORDER adjustable as a kernel boot time parameter Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 01/12] arch: mm: rename FORCE_MAX_ZONEORDER to ARCH_FORCE_MAX_ORDER Zi Yan
2022-08-13 15:36   ` Mike Rapoport
2022-08-15 12:53     ` Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 02/12] mm: rectify MAX_ORDER semantics to be the largest page order from buddy allocator Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 03/12] mm: replace MAX_ORDER when it is used to indicate max physical contiguity Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 04/12] mm: adapt deferred struct page init to new MAX_ORDER Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 05/12] mm: prevent pageblock size being larger than section size Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 06/12] fs: proc: use pageblock_nr_pages for reschedule period in read_kcore() Zi Yan
2022-08-23 10:36   ` David Hildenbrand [this message]
2022-08-11 23:16 ` [RFC PATCH v2 07/12] virtio: virtio_balloon: use pageblock_order instead of MAX_ORDER Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 08/12] mm/page_reporting: set page_reporting_order to -1 to prevent it running Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 09/12] mm: Make MAX_ORDER of buddy allocator configurable via Kconfig SET_MAX_ORDER Zi Yan
     [not found]   ` <becc0751-9ce9-6fab-8e58-477e962e54c5@infradead.org>
2022-08-13  2:37     ` Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 10/12] mm: convert MAX_ORDER sized static arrays to dynamic ones Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 11/12] mm: introduce MIN_MAX_ORDER to replace MAX_ORDER as compile time constant Zi Yan
2022-08-11 23:16 ` [RFC PATCH v2 12/12] mm: make MAX_ORDER a kernel boot time parameter Zi Yan
     [not found]   ` <2e15fc72-5483-b901-5a54-d4a4529d61d9@infradead.org>
2022-08-13  2:38     ` Zi Yan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=30dd7d1f-df39-ad89-94aa-d1562b84fa8b@redhat.com \
    --to=david@redhat.com \
    --cc=jhubbard@nvidia.com \
    --cc=jthoughton@google.com \
    --cc=kirill.shutemov@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=rientjes@google.com \
    --cc=rppt@kernel.org \
    --cc=shy828301@gmail.com \
    --cc=vbabka@suse.cz \
    --cc=willy@infradead.org \
    --cc=ziy@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox