Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@kernel.org>
To: Pratyush Yadav <pratyush@kernel.org>
Cc: George Guo <dongtai.guo@linux.dev>,
	pasha.tatashin@soleen.com, graf@amazon.com, jasonmiu@google.com,
	ran.xiaokai@zte.com.cn, akpm@linux-foundation.org,
	linux-kernel@vger.kernel.org, kexec@lists.infradead.org,
	linux-mm@kvack.org, George Guo <guodongtai@kylinos.cn>,
	Kexin Liu <liukexin@kylinos.cn>
Subject: Re: [PATCH 1/1] kho: fix KHO_TREE_MAX_DEPTH for non-4KB page sizes
Date: Wed, 13 May 2026 10:50:40 +0300	[thread overview]
Message-ID: <agQtUOImdpoYrfkV@kernel.org> (raw)
In-Reply-To: <2vxzcxz2dybi.fsf@kernel.org>

On Mon, May 11, 2026 at 12:40:01PM +0200, Pratyush Yadav wrote:
> On Sat, May 09 2026, George Guo wrote:
> 
> > From: George Guo <guodongtai@kylinos.cn>
> >
> > KHO_TREE_MAX_DEPTH is calculated as:
> >
> >   DIV_ROUND_UP(KHO_ORDER_0_LOG2 - KHO_BITMAP_SIZE_LOG2,
> >                KHO_TABLE_SIZE_LOG2) + 1
> >
> > For systems with 16KB pages (e.g. LoongArch), this gives a depth of 4,
> 
> As of now, we only support KHO on x86 and arm64. Support for other
> architectures is not there. Are you working on supporting it for
> LoongArch? What is your use case?

arm64 can have 16k pages, but ...
 
> So based on this, looks to me that the 5th level table won't ever go
> above index 0 and the 4th level is enough to represent all possible
> keys.
 
... as it looks like your math is correct, I'm going to drop the patch for
now.

> -- 
> Regards,
> Pratyush Yadav

-- 
Sincerely yours,
Mike.


  reply	other threads:[~2026-05-13  7:50 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-09  2:44 [PATCH 1/1] kho: fix KHO_TREE_MAX_DEPTH for non-4KB page sizes George Guo
2026-05-10 15:26 ` Mike Rapoport
2026-05-11 10:40 ` Pratyush Yadav
2026-05-13  7:50   ` Mike Rapoport [this message]
2026-05-13 15:07   ` George Guo

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=agQtUOImdpoYrfkV@kernel.org \
    --to=rppt@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=dongtai.guo@linux.dev \
    --cc=graf@amazon.com \
    --cc=guodongtai@kylinos.cn \
    --cc=jasonmiu@google.com \
    --cc=kexec@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liukexin@kylinos.cn \
    --cc=pasha.tatashin@soleen.com \
    --cc=pratyush@kernel.org \
    --cc=ran.xiaokai@zte.com.cn \
    /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