Re: [PATCH 1/5] mm: add PSI accounting around ->read_folio and ->readahead calls

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

 



On Sat, Sep 10, 2022 at 08:50:54AM +0200, Christoph Hellwig wrote:
> @@ -480,11 +487,14 @@ static inline int ra_alloc_folio(struct readahead_control *ractl, pgoff_t index,
>  	if (index == mark)
>  		folio_set_readahead(folio);
>  	err = filemap_add_folio(ractl->mapping, folio, index, gfp);
> -	if (err)
> +	if (err) {
>  		folio_put(folio);
> -	else
> -		ractl->_nr_pages += 1UL << order;
> -	return err;
> +		return err;
> +	}
> +
> +	ractl->_nr_pages += 1UL << order;
> +	ractl->_workingset = folio_test_workingset(folio);

I don't have time to look at this properly right now (about to catch a
bus to the plane), but I think this should be |=, not =?




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux