Re: [PATCH v3 03/11] s390/mm/gmap: Refactor gmap_fault() and add support for pfault

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 15, 2024 at 06:43:18PM +0200, Claudio Imbrenda wrote:
> When specifying FAULT_FLAG_RETRY_NOWAIT as flag for gmap_fault(), the
> gmap fault will be processed only if it can be resolved quickly and
> without sleeping. This will be needed for pfault.
> 
> Refactor gmap_fault() to improve readability.
> 
> Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
> Acked-by: Alexander Gordeev <agordeev@xxxxxxxxxxxxx>
> ---
>  arch/s390/mm/gmap.c | 119 +++++++++++++++++++++++++++++++++++++-------
>  1 file changed, 100 insertions(+), 19 deletions(-)
...

> +static int fixup_user_fault_nowait(struct mm_struct *mm, unsigned long address,
> +				   unsigned int fault_flags, bool *unlocked)
> +{
> +	struct vm_area_struct *vma;
> +	unsigned int test_flags;
> +	vm_fault_t fault;
> +	int rc;
> +
> +	fault_flags |= FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_RETRY_NOWAIT;
                                                ^^^^^^^^^^^^^^^^^^^^^^^

This is not necessary, because of

> +	if (fault_flags & FAULT_FLAG_RETRY_NOWAIT) {
> +		rc = fixup_user_fault_nowait(gmap->mm, vmaddr, fault_flags, &unlocked);

this.

In any case:
Reviewed-by: Heiko Carstens <hca@xxxxxxxxxxxxx>




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux