Re: Is it possible to implement the per-node page cache for programs/libraries?

From: Nicholas Piggin
Date: Fri Sep 03 2021 - 19:42:13 EST


Excerpts from Matthew Wilcox's message of September 4, 2021 5:01 am:
> On Fri, Sep 03, 2021 at 05:10:31PM +1000, Nicholas Piggin wrote:
>> Excerpts from Matthew Wilcox's message of September 2, 2021 8:17 pm:
>> > On Thu, Sep 02, 2021 at 01:25:36PM +1000, Nicholas Piggin wrote:
>> >> > I have been thinking about this a bit; one of our internal performance
>> >> > teams flagged the potential performance win to me a few months ago.
>> >> > I don't have a concrete design for text replication yet; there have been
>> >> > various attempts over the years, but none were particularly compelling.
>> >>
>> >> What was not compelling about it?
>> >
>> > It wasn't merged, so clearly it wasn't compelling enough?
>>
>> Ha ha. It sounded like you had some reasons you didn't find it
>> particularly compelling :P
>
> I haven't studied it in detail, but it seems to me that your patch (from
> 2007!) chooses whether to store pages or pcache_desc pointers in i_pages.
> Was there a reason you chose to do it that way instead of having per-node
> i_mapping pointers?

What Linus said. The patch was obviously mechanism only and more
heuristics would need to be done (in that case you could have per inode
hints or whatever).

> (And which way would you choose to do it now, given
> the infrastructure we have now?)

I'm not aware of anything new that would change it fundamentally.

Thanks,
Nick