On Thu, Sep 01, 2011 at 05:46:40PM -0400, Christoph Hellwig wrote:
> On Thu, Sep 01, 2011 at 02:22:15PM -0500, Alex Elder wrote:
> > that the buffer should be queued at unlock time, we now
> > just put it in the queue right away. Seems reasonable.
> > Do you know why enqueueing it was delayed before?
> I don't know why - it's a carryover from IRIX days,
Right. On Irix a buffer could simply have the BUF_DELWRI flag set on
it, and the buffer cache would take care of everything else. There
wasn't a specific delayed write list in Irix, instead there was a
fixed table of buffers (large!) that was scanned every 5 seconds
(20% scanned once per second) and the delwri buffers were gathered
by the scan. Hence there were places in XFS where it simply set the
flag to mark a buffer delwri, and that's what this Linux code had to
> so long before my time.
The XFS code long predates me, too, but I spend a couple of years in
the trenches around the Irix buffer cache when I was at SGI so I at
least know why it was like that. ;)