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: <ZKXQNa7mikRJWO2M@casper.infradead.org>
Date:   Wed, 5 Jul 2023 21:19:01 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Sidhartha Kumar <sidhartha.kumar@...cle.com>
Cc:     linux-kernel@...r.kernel.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org
Subject: Re: [PATCH v2 4/4] mm/memory: convert do_read_fault() to use folios

On Wed, Jul 05, 2023 at 12:43:35PM -0700, Sidhartha Kumar wrote:
> Saves one implicit call to compound_head()
> 
> Signed-off-by: Sidhartha Kumar <sidhartha.kumar@...cle.com>

Reviewed-by: Matthew Wilcox (Oracle) <willy@...radead.org>

> @@ -4543,10 +4544,12 @@ static vm_fault_t do_read_fault(struct vm_fault *vmf)
>  	if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY)))
>  		return ret;
>  
> +	folio = page_folio(vmf->page);

Why not move this down to after the call to finish_fault()?  The
compiler should be able to do a better job with that; it may have to
spill it to the stack to preserve it over the function call.

>  	ret |= finish_fault(vmf);
> -	unlock_page(vmf->page);
> +	folio_unlock(folio);
>  	if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY)))
> -		put_page(vmf->page);
> +		folio_put(folio);
>  	return ret;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ