Message ID | 20241203153232.92224-2-axboe@kernel.dk (mailing list archive) |
---|---|
Headers | show |
Series | Uncached buffered IO | expand |
On Tue, 3 Dec 2024, Jens Axboe wrote: > > So here's a new approach to the same concent, but using the page cache > as synchronization. That makes RWF_UNCACHED less special, in that it's > just page cache IO, except it prunes the ranges once IO is completed. Great idea and someting that is really important these days. However, one nit that I have is the use of the term "uncached" for a folio/page. An uncached "page frame" refers to a page frame that requires accesses not going through the cpu cache. I.e. device mappings. This is an established mm/cpu term as far as I can tell. So maybe be a bit more specific about which cache this is? PAGE_CACHE_UNCACHED? or use a different term. It is cached after all but only for a brief period. So this may be a "TEMPORAL_PAGE" or so? (Similar to the x86 "non-temporal" stores).
On 12/3/24 11:23 AM, Christoph Lameter (Ampere) wrote: > On Tue, 3 Dec 2024, Jens Axboe wrote: > >> >> So here's a new approach to the same concent, but using the page cache >> as synchronization. That makes RWF_UNCACHED less special, in that it's >> just page cache IO, except it prunes the ranges once IO is completed. > > > Great idea and someting that is really important these days. > > However, one nit that I have is the use of the term "uncached" for a > folio/page. An uncached "page frame" refers to a page frame that requires > accesses not going through the cpu cache. I.e. device mappings. This is > an established mm/cpu term as far as I can tell. > > So maybe be a bit more specific about which cache this is? > > PAGE_CACHE_UNCACHED? > > or use a different term. It is cached after all but only for a brief > period. So this may be a "TEMPORAL_PAGE" or so? (Similar to the x86 > "non-temporal" stores). I actually did consider using some form of temporal, as it's the only other name I liked. But I do think cached_uncached becomes pretty unwieldy. Which is why I just stuck with uncached. Yes I know it means different things in different circles, but probably mostly an overlap with deeper technical things like that. An honestly almost impossible to avoid overlap these days, everything has been used already :-) IOW, I think uncached is probably still the most descriptive thing out there, even if I'm certainly open to entertaining other names. Just not anything yet that has really resonated with me.
On Tue, 3 Dec 2024, Jens Axboe wrote: > I actually did consider using some form of temporal, as it's the only > other name I liked. But I do think cached_uncached becomes pretty > unwieldy. Which is why I just stuck with uncached. Yes I know it means > different things in different circles, but probably mostly an overlap > with deeper technical things like that. An honestly almost impossible to > avoid overlap these days, everything has been used already :-) > > IOW, I think uncached is probably still the most descriptive thing out > there, even if I'm certainly open to entertaining other names. Just not > anything yet that has really resonated with me. How about calling this a "transitory" page? It means fleeting, not persistent and I think we have not used that term with a page/folio yet.
On 12/3/24 3:16 PM, Christoph Lameter (Ampere) wrote: > On Tue, 3 Dec 2024, Jens Axboe wrote: > >> I actually did consider using some form of temporal, as it's the only >> other name I liked. But I do think cached_uncached becomes pretty >> unwieldy. Which is why I just stuck with uncached. Yes I know it means >> different things in different circles, but probably mostly an overlap >> with deeper technical things like that. An honestly almost impossible to >> avoid overlap these days, everything has been used already :-) >> >> IOW, I think uncached is probably still the most descriptive thing out >> there, even if I'm certainly open to entertaining other names. Just not >> anything yet that has really resonated with me. > > How about calling this a "transitory" page? It means fleeting, not > persistent and I think we have not used that term with a page/folio yet. I also hit the thesaurus ;-) I'm honestly not too worried about the internal name, as developers can figure that out. It's more about presenting an external name that sys developers will not need a lot of explaining to know what it's about. And something that isn't too long. BRIEFLY_CACHED? TRANSIENT_CACHE? Dunno, I keep going back to uncached as it's pretty easy to grok!
On Tue, Dec 03, 2024 at 03:41:53PM -0700, Jens Axboe wrote: > On 12/3/24 3:16 PM, Christoph Lameter (Ampere) wrote: > > On Tue, 3 Dec 2024, Jens Axboe wrote: > > > >> I actually did consider using some form of temporal, as it's the only > >> other name I liked. But I do think cached_uncached becomes pretty > >> unwieldy. Which is why I just stuck with uncached. Yes I know it means > >> different things in different circles, but probably mostly an overlap > >> with deeper technical things like that. An honestly almost impossible to > >> avoid overlap these days, everything has been used already :-) > >> > >> IOW, I think uncached is probably still the most descriptive thing out > >> there, even if I'm certainly open to entertaining other names. Just not > >> anything yet that has really resonated with me. > > > > How about calling this a "transitory" page? It means fleeting, not > > persistent and I think we have not used that term with a page/folio yet. > > I also hit the thesaurus ;-) > > I'm honestly not too worried about the internal name, as developers can > figure that out. It's more about presenting an external name that sys > developers will not need a lot of explaining to know what it's about. > And something that isn't too long. BRIEFLY_CACHED? TRANSIENT_CACHE? > > Dunno, I keep going back to uncached as it's pretty easy to grok! <shrug> RWF_DONTCACHE, to match {I,DCACHE}_DONTCACHE ? ;) They sound pretty similar ("load this so I can do something with it, evict it immediately if possible") though I wouldn't rely on people outside the kernel being familiar with the existing dontcaches. --D > -- > Jens Axboe > >
On 12/3/24 10:52 PM, Darrick J. Wong wrote: > On Tue, Dec 03, 2024 at 03:41:53PM -0700, Jens Axboe wrote: >> On 12/3/24 3:16 PM, Christoph Lameter (Ampere) wrote: >>> On Tue, 3 Dec 2024, Jens Axboe wrote: >>> >>>> I actually did consider using some form of temporal, as it's the only >>>> other name I liked. But I do think cached_uncached becomes pretty >>>> unwieldy. Which is why I just stuck with uncached. Yes I know it means >>>> different things in different circles, but probably mostly an overlap >>>> with deeper technical things like that. An honestly almost impossible to >>>> avoid overlap these days, everything has been used already :-) >>>> >>>> IOW, I think uncached is probably still the most descriptive thing out >>>> there, even if I'm certainly open to entertaining other names. Just not >>>> anything yet that has really resonated with me. >>> >>> How about calling this a "transitory" page? It means fleeting, not >>> persistent and I think we have not used that term with a page/folio yet. >> >> I also hit the thesaurus ;-) >> >> I'm honestly not too worried about the internal name, as developers can >> figure that out. It's more about presenting an external name that sys >> developers will not need a lot of explaining to know what it's about. >> And something that isn't too long. BRIEFLY_CACHED? TRANSIENT_CACHE? >> >> Dunno, I keep going back to uncached as it's pretty easy to grok! > > <shrug> RWF_DONTCACHE, to match {I,DCACHE}_DONTCACHE ? ;) > > They sound pretty similar ("load this so I can do something with it, > evict it immediately if possible") though I wouldn't rely on people > outside the kernel being familiar with the existing dontcaches. Naming is hard! Most people do seem to grok what uncached means, when I've shopped it around. The fact that it does use the page cache is pretty irrelevant, that's more of an implementation detail to solve various issues around competing users of it. That it doesn't persist is the important bit, and uncached does seem to relay that pretty nicely.