xfs
[Top] [All Lists]

Re: pagebuf page cleaner and page aging

To: Marcelo Tosatti <marcelo@xxxxxxxxxxxxxxxx>
Subject: Re: pagebuf page cleaner and page aging
From: Rajagopal Ananthanarayanan <ananth@xxxxxxx>
Date: Fri, 19 Jan 2001 15:28:45 -0800
Cc: Christoph Hellwig <hch@xxxxxxxxxx>, linux-xfs@xxxxxxxxxxx
References: <Pine.LNX.4.21.0101191721001.5940-100000@freak.distro.conectiva>
Sender: owner-linux-xfs@xxxxxxxxxxx
Marcelo Tosatti wrote:
> 

> 
> Now I dont see any problem with write clustering (potentially converting
> pages if we found delayed pages). Remember that page_launder() is called
> by each process since 2.4.1pre2, so there is no big problem if kswapd
> blocks trying to convert pages.

You are referring to writepage() doing the conversion & clustering when
called from page_launder()? IOW, do the conversion/clustering as part of
the memory allocation, right?

There are no major issues with it: infact at one point I had the
convertpage() call out of page_launder to do conversions inplace,
instead of waking up the page_cleaner daemon. Two potential pitfalls.
(1) the conversion/clustering can involve memory allocation --- now
    you are allocating more memory when already trying to allocate memory
    (and in fact facing a shortage of memory) ... can the process now
    be marked PF_MEMALLOC?
(2) potential locking problems in the FS. If the original memory allocation
    is done under a lock, as is the case in XFS, which holds the IOLOCK,
    then the convert call should be able to trylock & bail.

--------------------------------------------------------------------------
Rajagopal Ananthanarayanan ("ananth")
Member Technical Staff, SGI.
--------------------------------------------------------------------------

<Prev in Thread] Current Thread [Next in Thread>