Re: [PATCH V8 4/8] mm/fs: add hooks to support cleancache

From: OGAWA Hirofumi
Date: Fri Apr 15 2011 - 11:38:04 EST


Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> writes:

>> > Before I suggested a thing about cleancache_flush_page,
>> > cleancache_flush_inode.
>> >
>> > what's the meaning of flush's semantic?
>> > I thought it means invalidation.
>> > AFAIC, how about change flush with invalidate?
>>
>> I'm not sure the words "flush" and "invalidate" are defined
>> precisely or used consistently everywhere in computer
>> science, but I think that "invalidate" is to destroy
>> a "pointer" to some data, but not necessarily destroy the
>> data itself. And "flush" means to actually remove
>> the data. So one would "invalidate a mapping" but one
>> would "flush a cache".
>>
>> Since cleancache_flush_page and cleancache_flush_inode
>> semantically remove data from cleancache, I think flush
>> is a better name than invalidate.
>>
>> Does that make sense?
>>
>
> nope ;)
>
> Kernel code freely uses "flush" to refer to both invalidation and to
> writeback, sometimes in confusing ways. In this case,
> cleancache_flush_inode and cleancache_flush_page rather sound like they
> might write those things to backing store.

I'd like to mention about *_{get,put}_page too. In linux get/put is not
meaning read/write. There is {get,put}_page those are refcount stuff
(Yeah, and I felt those methods does refcount by quick read. But it
seems to be false. There is no xen codes, so I don't know actually
though.).

And I agree, I also think the needing thing is consistency on the linux
codes (term).

Thanks.
--
OGAWA Hirofumi <hirofumi@xxxxxxxxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/