Re: [RFC/Feature Request] bcache: support io priority
"Coly Li" <[email protected]> Wed, 18 Feb 2026 22:23:12 +0800
| Newsgroups | org.kernel.vger.linux-bcache |
|---|---|
| Message-ID | <[email protected]> |
> 2026年2月6日 10:38,yangliming <[email protected]> 写道: > > Hi bcache developers, > > Many business scenarios require different IO priorities. After setting IO priorities, the goal is to have high-priority writes go to the SSD cache, while low-priority requests are bypassed to the HDD. Currently, the logic is: > ``` > > if ((bio->bi_opf & (REQ_RAHEAD|REQ_BACKGROUND))) { > > if (!(bio->bi_opf & (REQ_META|REQ_PRIO)) && > > (dc->cache_readahead_policy != BCH_CACHE_READA_ALL)) > > goto skip; > > } > ``` > > This logic allows IO requests to bypass, but the request type cannot be controlled in user space. > > Could you support setting bypass based on IO request priority? Is such a requirement reasonable? We had patch for caching by I/O priorities, but the interface was too complicated IMHO. For this suggestion, what is the user interface in your mind? Thanks. Coly Li