EnhanceIO icon indicating copy to clipboard operation
EnhanceIO copied to clipboard

/proc interface to manage caches

Open d-a-v opened this issue 7 years ago • 2 comments

I happen to have a nearly ready pull request that allows caches management directly from a new procfs file /proc/enhanceio/control. It allows to enable caches directly from initrd scripts thanks to this because the python CLI is not anymore required. Is this is of any interest, I can make a PR.

For example this creates a cache:

echo "  create   policy = lru mode=wb   bs=4096 cache=test ssd=/dev/zram0 dev=$(readlink -f /dev/disk/by-id/ata-Micron_1100_SATA_256GB_1720171DB8D8-part1)  " > /proc/enhanceio/control

(this is a test line where spaces are intentionally not coherent)

d-a-v avatar Sep 18 '17 09:09 d-a-v

Sorry for ignoring you for such a long time :). I see nothing wrong with your idea, i'd like to get rid of user-space tool myself. Kernel part should handle all logic and sanity checks. To make things consistent, this method should be the only one supported, and eio_cli should be rewritten as a wrapper to it. What would be even nicer is moving to /sys interface instead of /proc. I'll have a deeper look into your patch and hopefully merge it to some new branch. Thanks.

lanconnected avatar Nov 08 '17 14:11 lanconnected

Agreed with a new eio_cli (with same syntax).

d-a-v avatar Nov 09 '17 12:11 d-a-v