gluster-devel
[Top][All Lists]
Advanced

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

Re: [Gluster-devel] IO-Cache or Glupy


From: Jeff Darcy
Subject: Re: [Gluster-devel] IO-Cache or Glupy
Date: Tue, 01 Apr 2014 14:17:08 -0004



On Tue, Apr 1, 2014 at 7:17 AM, Музафаров Максим Ринатович <address@hidden> wrote:
Where I can find some documentation about io-cache translator? I want to test some more caching algorithms instead of LRU, but missed in structures of io-cache. Is it true, that I just need to change page->page_lru structure or any other?

Unfortunately, there's no documentation for how this (or almost any other) translator works internally. I have a project to write a "book" covering that kind of material, but I haven't gotten further than a table of contents due to other commitments.

It's not clear that you need to change the data structures so much as a few key functions. The LRU strategy is effectively defined by __ioc_page_get (additions) and __ioc_inode_prune (evictions) so you'll probably want to take a good look at the call trees for both of those. In particular, make sure you understand some of the synchronization concerns. There are a lot of edge cases when faults, cached reads, writes, truncates, etc. overlap.

Another time, I can write my own cache translator, using glupy, but I don’t know, how can I get data from file? Is it “xdata” variable or something else?

I'm not sure how xdata would help, and in any case it's not fully handled by glupy yet. Most of the information you need is in the arguments for readv, writev, and (f)truncate, so look at the default_xxx definitions for those.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]