lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <69d84b71-d90a-4a5b-83c4-984432b4999a@lucifer.local>
Date: Thu, 8 May 2025 10:40:31 +0100
From: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>
To: Anshuman Khandual <anshuman.khandual@....com>
Cc: Dev Jain <dev.jain@....com>, akpm@...ux-foundation.org,
        Liam.Howlett@...cle.com, vbabka@...e.cz, jannh@...gle.com,
        pfalcato@...e.de, linux-mm@...ck.org, linux-kernel@...r.kernel.org,
        david@...hat.com, peterx@...hat.com, ryan.roberts@....com,
        mingo@...nel.org, libang.li@...group.com, maobibo@...ngson.cn,
        zhengqi.arch@...edance.com, baohua@...nel.org, willy@...radead.org,
        ioworker0@...il.com, yang@...amperecomputing.com,
        baolin.wang@...ux.alibaba.com, ziy@...dia.com, hughd@...gle.com
Subject: Re: [PATCH v2 2/2] mm: Optimize mremap() by PTE batching

On Thu, May 08, 2025 at 12:46:41PM +0530, Anshuman Khandual wrote:
> On 5/7/25 11:32, Dev Jain wrote:
[snip]
> > +/* mremap a batch of PTEs mapping the same large folio */
> > +static int mremap_folio_pte_batch(struct vm_area_struct *vma, unsigned long addr,
> > +		pte_t *ptep, pte_t pte, int max_nr)
> > +{
> > +	const fpb_t flags = FPB_IGNORE_DIRTY | FPB_IGNORE_SOFT_DIRTY;
> > +	struct folio *folio;
> > +	int nr = 1;
>
> A small nit - s/nr/nr_pages ?

Agree in principal, but I think nr_ptes is clearer. You might not even be
dealing with a page, if you hit a pte_none() pte for instance.

So max_nr_ptes, nr_ptes.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ