On Tue, Jan 21, 2025 at 08:27:17PM +0900, Honggyu Kim wrote: > Hi Ying and Joshua, > > IMHO, this interface is somewhat hard to be used. Users need to know > > which value is legal. So, this will become something like, > > > > $ cat mode > > auto [manual] > > $ echo auto > mode > > $ cat mode > > [auto] manual > > This is exactly I internally proposed to Hyeonggon, but couldn't share > the idea directly here. > > That also makes sense, but I feel like somewhat vague what "auto" false > means. The "auto" might be better to be "use_hmat" instead and this > makes "use_hmat" false more meaningful. "use_hmat_weight" or > "use_hmat_info" might be another candidates. > I don't think we want to encode hmat-ism into the uapi. In fact, mempolicy doesn't even know about hmat. It just gets source information from *somewhere* and applies it accordingly. I think what you might be asking for is auto -> [true, false] if auto=true mode -> [default, read_bw, write_bw, combined_bw, read_ltc, write_ltc, combined_ltc] if auto=false mode -> [disabled] Where default mode is the kernel selection of whatever combination of read/write bw/ltc data, and user could switch the attribute. HOWEVER, such `mode` would require us to cache the attribute structure per-node, and maybe some thought on what's reasonable, so that I would prefer that to be a completely different feature / discussion. ~Gregory