Re: [PATCHSET v6 0/12] Uncached buffered IO

Jens Axboe
2024-12-13T14:49:59Z

On 12/12/24 10:04 PM, Johannes Weiner wrote:
> On Thu, Dec 12, 2024 at 07:35:28PM +0000, Matthew Wilcox wrote:
>> On Thu, Dec 12, 2024 at 12:14:23PM -0700, Jens Axboe wrote:
>>> Like I mentioned earlier, the fact that it's cached for the duration of
>>> the operation is more of an implementation detail that developers need
>>> not worry about. What's important is that it's not cached AFTER. I still
>>> feel UNCACHED is the best description, but I'll change it to DONTCACHE
>>> for the next version just to avoid the overlap with other in-kernel
>>> uses.
>>
>> Regardless of the user API name, I like PG_streaming for the folio
>> flag name.
>
> If we're throwing names in the ring, I'm partial to PG_dropbehind.
>
> It's a term I think has been used to describe this type of behavior
> before; it juxtaposes nicely with readahead; it plainly names the
> action of what will happen to the page after the current IO operation
> against it has completed (i.e. pairs up with PG_reclaim).

True, I do think that's a good name for the folio flag. streaming isn't
bad, but it's not fully descriptive as the IO may not be streaming at
all, depending on the use case. I do remember when we used dropbehind
naming in the vm, probably 20 some years ago?

If there are no objections to this, I'll change the folio flag to
dropbehind. Also looks nicer with the bit operations on the folio, when
you have:

if (flags & RWF_DONTCACHE)
folio_set_dropbehind(folio);

rather than:

if (flags & RWF_DONTCACHE)
folio_set_streaming(folio);

and so forth, as the former just intuitively makes sense.

--
Jens Axboe