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: <20250605073950.1834-1-lizhe.67@bytedance.com>
Date: Thu,  5 Jun 2025 15:39:50 +0800
From: lizhe.67@...edance.com
To: david@...hat.com
Cc: akpm@...ux-foundation.org,
	dev.jain@....com,
	jgg@...pe.ca,
	jhubbard@...dia.com,
	linux-kernel@...r.kernel.org,
	linux-mm@...ck.org,
	muchun.song@...ux.dev,
	peterx@...hat.com,
	lizhe.67@...edance.com
Subject: Re: [PATCH v3] gup: optimize longterm pin_user_pages() for large folio

On Thu,  5 Jun 2025 11:34:30 +0800, lizhe.67@...edance.com wrote:

> @@ -2324,16 +2349,12 @@ static void collect_longterm_unpinnable_folios(
>  		struct list_head *movable_folio_list,
>  		struct pages_or_folios *pofs)
>  {
> -	struct folio *prev_folio = NULL;
>  	bool drain_allow = true;
> -	unsigned long i;
> -
> -	for (i = 0; i < pofs->nr_entries; i++) {
> -		struct folio *folio = pofs_get_folio(pofs, i);
> +	struct folio *folio;
> +	long i = 0;
>  
> -		if (folio == prev_folio)
> -			continue;
> -		prev_folio = folio;
> +	for (folio = pofs_get_folio(pofs, i); folio;
> +			folio = pofs_next_folio(folio, pofs, &i)) {

Hi David, I used three tabs for indentation here, but it doesn't seem to be
the effect you wanted. Did you mean that the indentation could be achieved
through tags and spaces, so that the folio on this line would be positioned
directly below the folio on the previous line, but offset to the right by
one space?

Thanks,
Zhe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ