Re: [PATCH] mm: remove redundant if overhead

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

 



On Tue, Sep 10, 2024 at 10:39:45PM +0800, Zhiguo Jiang wrote:
> Remove redundant if judgment overhead.

It's not redundant; it avoids dirtying the cacheline if the folio
is already marked as dirty.

>  bool noop_dirty_folio(struct address_space *mapping, struct folio *folio)
>  {
> -	if (!folio_test_dirty(folio))
> -		return !folio_test_set_dirty(folio);
> -	return false;
> +	return !folio_test_set_dirty(folio);
>  }




[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