Re: mmap on a device returns ENODEV

Linus Torvalds (torvalds@transmeta.com)
Fri, 10 Dec 1999 09:18:04 -0800 (PST)


On Fri, 10 Dec 1999, Ingo Molnar wrote:
>
> the attached small patch against 2.3.32-pre2 adds all pagecache blocks
> that have established mappings to the buffer-cache hashlists (and can thus
> can be looked up), including the swapcache. It works fine here and there
> is no noticeable slowdown anywhere.

I really don't like this. It shouldn't be needed, and it does slow down
lookups (the fact that we no longer do buffer cache lookups as often as we
historically did hides the issue, but it's still conceptually wrong).

I think we should synchronize only through the page cache, and in cases
where that is impossible (ie different indices - a file vs a raw device)
we should not even try. Synchronization is not only expensive, it tends to
come and bite you later when you want to do something really clever. So
don't try to maintain coherency unless absolutely 100% _required_ - and I
don't think it is required at all in this case.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/