mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Barry Song <21cnbao@gmail.com>,
	akpm@linux-foundation.org, linux-mm@kvack.org
Cc: baolin.wang@linux.alibaba.com, chrisl@kernel.org,
	linux-kernel@vger.kernel.org, mhocko@suse.com,
	ryan.roberts@arm.com, shy828301@gmail.com, surenb@google.com,
	v-songbaohua@oppo.com, willy@infradead.org, ying.huang@intel.com,
	yosryahmed@google.com, yuzhao@google.com,
	Shuai Yuan <yuanshuai@oppo.com>
Subject: Re: [PATCH v2 1/3] mm: extend rmap flags arguments for folio_add_new_anon_rmap
Date: Tue, 18 Jun 2024 11:52:58 +0200	[thread overview]
Message-ID: <03d08299-40d3-41c6-99f2-15cc3d589311@redhat.com> (raw)
In-Reply-To: <20240617231137.80726-2-21cnbao@gmail.com>

> diff --git a/mm/rmap.c b/mm/rmap.c
> index a3c99ac63155..2b19bb92eda5 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -1406,25 +1406,26 @@ void folio_add_anon_rmap_pmd(struct folio *folio, struct page *page,
>    * This means the inc-and-test can be bypassed.
>    * The folio does not have to be locked.
>    *
> - * If the folio is pmd-mappable, it is accounted as a THP.  As the folio
> - * is new, it's assumed to be mapped exclusively by a single process.
> + * If the folio is pmd-mappable, it is accounted as a THP.
>    */
>   void folio_add_new_anon_rmap(struct folio *folio, struct vm_area_struct *vma,
> -		unsigned long address)
> +		unsigned long address, rmap_t flags)
>   {
>   	int nr = folio_nr_pages(folio);
>   	int nr_pmdmapped = 0;
> +	bool exclusive = flags & RMAP_EXCLUSIVE;

One nit: Make it "const" and move it above "int nr ..." to maintain a 
nice reverse christmas tree we all love ;)

Thanks!

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

-- 
Cheers,

David / dhildenb


  reply	other threads:[~2024-06-18  9:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-17 23:11 [PATCH v2 0/3] mm: clarify folio_add_new_anon_rmap() and __folio_add_anon_rmap() Barry Song
2024-06-17 23:11 ` [PATCH v2 1/3] mm: extend rmap flags arguments for folio_add_new_anon_rmap Barry Song
2024-06-18  9:52   ` David Hildenbrand [this message]
2024-06-22  3:02   ` Barry Song
2024-06-17 23:11 ` [PATCH v2 2/3] mm: use folio_add_new_anon_rmap() if folio_test_anon(folio)==false Barry Song
2024-06-18  9:54   ` David Hildenbrand
2024-06-20  7:46   ` David Hildenbrand
2024-06-20  8:33     ` Barry Song
2024-06-20  8:49       ` David Hildenbrand
2024-06-20  9:59         ` Barry Song
2024-06-21  9:18           ` David Hildenbrand
2024-06-22  3:20             ` Barry Song
2024-06-24 23:25               ` Andrew Morton
2024-06-24 23:42                 ` Barry Song
2024-06-17 23:11 ` [PATCH v2 3/3] mm: remove folio_test_anon(folio)==false path in __folio_add_anon_rmap() Barry Song
2024-06-18  9:55   ` David Hildenbrand

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=03d08299-40d3-41c6-99f2-15cc3d589311@redhat.com \
    --to=david@redhat.com \
    --cc=21cnbao@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=chrisl@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.com \
    --cc=ryan.roberts@arm.com \
    --cc=shy828301@gmail.com \
    --cc=surenb@google.com \
    --cc=v-songbaohua@oppo.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.com \
    --cc=yosryahmed@google.com \
    --cc=yuanshuai@oppo.com \
    --cc=yuzhao@google.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

all inboxes | Powered by JetHome®