linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vineet Gupta <vgupta@kernel.org>
To: Zi Yan <ziy@nvidia.com>, Matthew Wilcox <willy@infradead.org>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Vlastimil Babka <vbabka@suse.cz>,
	David Hildenbrand <david@redhat.com>,
	Miaohe Lin <linmiaohe@huawei.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	John Hubbard <jhubbard@nvidia.com>,
	"Huang, Ying" <ying.huang@intel.com>,
	Ryan Roberts <ryan.roberts@arm.com>,
	Alexander Potapenko <glider@google.com>,
	Kees Cook <keescook@chromium.org>,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	Vineet Gupta <vgupta@kernel.org>,
	Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Subject: Re: [PATCH] mm: use clear_user_(high)page() for arch with special user folio handling
Date: Fri, 6 Dec 2024 09:31:27 -0800	[thread overview]
Message-ID: <bc3b86dd-9bb6-4c6e-b6df-35c687375cde@kernel.org> (raw)
In-Reply-To: <78D4C1B5-3EE7-47F0-A7A2-F1ACFE71CED0@nvidia.com>

On 12/6/24 09:08, Zi Yan wrote:
> On 6 Dec 2024, at 11:42, Matthew Wilcox wrote:
>
>> On Fri, Dec 06, 2024 at 09:19:38AM -0500, Zi Yan wrote:
>>> For architectures setting ARCH_HAS_CPU_CACHE_ALIASING, which requires
>>> flushing cache and arc, which sets folio->flags after clearing a user
>>> folio
>> I think arc just has some legacy code left that needs to be ripped out.
>> See commit d5272aaa8257 which took away ARCH_HAS_CPU_CACHE_ALIASING
>> from arc.
> The PG_dc_clean bit seems not to be related to cache aliasing.
> See commit eacd0e950dc2 ("ARC: [mm] Lazy D-cache flush (non aliasing VIPT)")

Indeed it is not related to aliasing.

>> Looking at 8690bbcf3b70, I wonder if you want to use
>> cpu_dcache_is_aliasing() here?
> Yeah, this is more precise. Will use this in my next version. Thanks.

Commit 8690bbcf3b70 was wrong for ARC as it assumed aliasing is true. The
aliasing D$ code is all gone and cpu_dcache_is_aliasing() is false for ARC now.

-vineet



      reply	other threads:[~2024-12-06 17:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-06 14:19 Zi Yan
2024-12-06 16:42 ` Matthew Wilcox
2024-12-06 17:08   ` Zi Yan
2024-12-06 17:31     ` Vineet Gupta [this message]

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=bc3b86dd-9bb6-4c6e-b6df-35c687375cde@kernel.org \
    --to=vgupta@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=david@redhat.com \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=glider@google.com \
    --cc=jhubbard@nvidia.com \
    --cc=keescook@chromium.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=ryan.roberts@arm.com \
    --cc=vbabka@suse.cz \
    --cc=wangkefeng.wang@huawei.com \
    --cc=willy@infradead.org \
    --cc=ying.huang@intel.com \
    --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