All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yin, Fengwei" <fengwei.yin@intel.com>
To: David Hildenbrand <david@redhat.com>,
	Matthew Wilcox <willy@infradead.org>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>,
	"mike.kravetz@oracle.com" <mike.kravetz@oracle.com>,
	"sidhartha.kumar@oracle.com" <sidhartha.kumar@oracle.com>,
	"naoya.horiguchi@nec.com" <naoya.horiguchi@nec.com>,
	"chu, jane" <jane.chu@oracle.com>
Subject: Re: [PATCH v2 0/5] batched remove rmap in try_to_unmap_one()
Date: Fri, 3 Mar 2023 10:44:26 +0800	[thread overview]
Message-ID: <e1d00088-5107-1987-c34a-ca5031b65309@intel.com> (raw)
In-Reply-To: <15cf14e3-946e-269b-f98d-004c395524ae@redhat.com>



On 3/2/2023 10:55 PM, David Hildenbrand wrote:
> On 02.03.23 15:33, Matthew Wilcox wrote:
>> On Thu, Mar 02, 2023 at 03:23:46PM +0100, David Hildenbrand wrote:
>>> If no workload/benchmark is affected (or simply corner cases where nobody
>>> cares about performance), I hope you understand that it's hard to argue why
>>> we should care about such an optimization then.
>>
>> In order to solve the mapcount problem, we're going to want to unmap
>> the entire folio in one call, instead of unmapping each page in it
>> individually and checking each time whether there are any remaining
>> pages from this folio still mapped.
This is a good point.

> 
> Okay, thanks. That should better be added to the cover letter, ideally with more details on the mapcount goal and how this patch set will helps in that regard. So far the cover letter only talks about eventual performance gains.

This patch reconstruct the try_to_unmap_one() from:
  loop:
     clear and update PTE
     unmap one page
     goto loop

to:
  loop:
     clear and update PTE
     goto loop
  unmap the range of folio in one call

Finally, if the entire folio is always mapped, it will be
unmapped entirely also. I will add this to cover letter.
Thanks.

Regards
Yin, Fengwei

> 


  reply	other threads:[~2023-03-03  2:44 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-28 12:23 [PATCH v2 0/5] batched remove rmap in try_to_unmap_one() Yin Fengwei
2023-02-28 12:23 ` [PATCH v2 1/5] rmap: move hugetlb try_to_unmap to dedicated function Yin Fengwei
2023-02-28 12:23 ` [PATCH v2 2/5] rmap: move page unmap operation " Yin Fengwei
2023-02-28 12:23 ` [PATCH v2 3/5] rmap: cleanup exit path of try_to_unmap_one_page() Yin Fengwei
2023-02-28 12:23 ` [PATCH v2 4/5] rmap:addd folio_remove_rmap_range() Yin Fengwei
2023-02-28 12:23 ` [PATCH v2 5/5] try_to_unmap_one: batched remove rmap, update folio refcount Yin Fengwei
2023-02-28 20:28 ` [PATCH v2 0/5] batched remove rmap in try_to_unmap_one() Andrew Morton
2023-03-01  1:44   ` Yin, Fengwei
2023-03-02 10:04     ` David Hildenbrand
2023-03-02 13:32       ` Yin, Fengwei
2023-03-02 14:23         ` David Hildenbrand
2023-03-02 14:33           ` Matthew Wilcox
2023-03-02 14:55             ` David Hildenbrand
2023-03-03  2:44               ` Yin, Fengwei [this message]
2023-03-03  2:26           ` Yin, Fengwei
2023-03-06  9:11             ` Yin Fengwei

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=e1d00088-5107-1987-c34a-ca5031b65309@intel.com \
    --to=fengwei.yin@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=jane.chu@oracle.com \
    --cc=linux-mm@kvack.org \
    --cc=mike.kravetz@oracle.com \
    --cc=naoya.horiguchi@nec.com \
    --cc=sidhartha.kumar@oracle.com \
    --cc=willy@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.