linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Roberts <ryan.roberts@arm.com>
To: Kefeng Wang <wangkefeng.wang@huawei.com>,
	David Hildenbrand <david@redhat.com>,
	Yang Shi <shy828301@gmail.com>
Cc: Matthew Wilcox <willy@infradead.org>,
	Yang Shi <yang@os.amperecomputing.com>,
	riel@surriel.com, cl@linux.com, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Ze Zuo <zuoze1@huawei.com>
Subject: Re: [RESEND PATCH] mm: align larger anonymous mappings on THP boundaries
Date: Tue, 7 May 2024 16:53:10 +0100	[thread overview]
Message-ID: <2b403705-a03c-4cfe-8d95-b38dd83fca52@arm.com> (raw)
In-Reply-To: <da24d8bb-3723-48fa-86f4-8b24457d3556@huawei.com>

On 07/05/2024 14:53, Kefeng Wang wrote:
> 
> 
> On 2024/5/7 19:13, David Hildenbrand wrote:
>>
>>> https://github.com/intel/lmbench/blob/master/src/lat_mem_rd.c#L95
>>>
>>>> suggest. If you want to try something semi-randomly; it might be useful to rule
>>>> out the arm64 contpte feature. I don't see how that would be interacting
>>>> here if
>>>> mTHP is disabled (is it?). But its new for 6.9 and arm64 only. Disable with
>>>> ARM64_CONTPTE (needs EXPERT) at compile time.
>>> I don't enabled mTHP, so it should be not related about ARM64_CONTPTE,
>>> but will have a try.
> 
> After ARM64_CONTPTE disabled, memory read latency is similar with ARM64_CONTPTE
> enabled(default 6.9-rc7), still larger than align anon reverted.

OK thanks for trying.

Looking at the source for lmbench, its malloc'ing (512M + 8K) up front and using
that for all sizes. That will presumably be considered "large" by malloc and
will be allocated using mmap. So with the patch, it will be 2M aligned. Without
it, it probably won't. I'm still struggling to understand why not aligning it in
virtual space would make it more performant though...

Is it possible to provide the smaps output for at least that 512M+8K block for
both cases? It might give a bit of a clue.

Do you have traditional (PMD-sized) THP enabled? If its enabled and unaligned
then the front of the buffer wouldn't be mapped with THP, but if it is aligned,
it will. That could affect it.

> 
>>
>> cont-pte can get active if we're just lucky when allocating pages in the right
>> order, correct Ryan?
>>



  reply	other threads:[~2024-05-07 15:53 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-14 22:34 Yang Shi
2024-01-20 12:04 ` Ryan Roberts
2024-01-20 12:13   ` Ryan Roberts
2024-01-20 16:39   ` Matthew Wilcox
2024-01-22 11:37     ` Ryan Roberts
2024-01-22 19:43       ` Yang Shi
2024-01-23  9:41         ` Ryan Roberts
2024-01-23 17:14           ` Yang Shi
2024-01-23 17:26             ` Yang Shi
2024-01-23 17:26             ` Ryan Roberts
2024-01-23 17:33               ` Yang Shi
2024-05-07  8:25               ` Kefeng Wang
2024-05-07 10:08                 ` Ryan Roberts
2024-05-07 10:59                   ` Kefeng Wang
2024-05-07 11:13                     ` David Hildenbrand
2024-05-07 11:14                       ` Ryan Roberts
2024-05-07 11:26                         ` Ryan Roberts
2024-05-07 11:34                           ` David Hildenbrand
2024-05-07 11:42                             ` David Hildenbrand
2024-05-07 12:36                               ` Ryan Roberts
2024-05-07 13:53                       ` Kefeng Wang
2024-05-07 15:53                         ` Ryan Roberts [this message]
2024-05-07 17:17                           ` Yang Shi
2024-05-08  7:48                             ` Kefeng Wang
2024-05-08  8:36                               ` Ryan Roberts
2024-05-08 13:37                                 ` Kefeng Wang
2024-05-08 13:41                                   ` Ryan Roberts
2024-05-08 15:25                                   ` Yang Shi
2024-05-09  1:47                                     ` Kefeng Wang
2024-01-22 20:20       ` Yang Shi

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=2b403705-a03c-4cfe-8d95-b38dd83fca52@arm.com \
    --to=ryan.roberts@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=cl@linux.com \
    --cc=david@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=riel@surriel.com \
    --cc=shy828301@gmail.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=willy@infradead.org \
    --cc=yang@os.amperecomputing.com \
    --cc=zuoze1@huawei.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