Re: [v2 PATCH] mm: gup: do not call try_grab_folio() in slow path

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

 



> +int __must_check try_grab_folio(struct folio *folio, int refs, unsigned int flags)

Overly long line (same for the external declaration)

> +	struct page *page = &folio->page;

Page is only used for is_pci_p2pdma_page and is_zero_page, and for
the latter a is_zero_folio already exist.  Maybe remove the local
variable, use is_zero_folio and just open code the dereference in the
is_pci_p2pdma_page call?

> +		ret = gup_hugepte(vma, ptep, sz, addr, end, flags, pages, nr, fast);

Overly lone line.

> +		folio_ref_add(folio,
> +				refs * (GUP_PIN_COUNTING_BIAS - 1));

Nit: this easily fits onto a single line.

>  			if (gup_hugepd(NULL, __hugepd(pmd_val(pmd)), addr,
> -				       PMD_SHIFT, next, flags, pages, nr) != 1)
> +				       PMD_SHIFT, next, flags, pages, nr, true) != 1)

Overly long lin (same in the similar calls below)





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux