gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: give us a hand with arch


From: Momchil Velikov
Subject: Re: [Gnu-arch-users] Re: give us a hand with arch
Date: 30 Sep 2003 10:09:10 +0300
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

>>>>> "Robin" == Robin Farine <address@hidden> writes:

>>>>> "Florian" == Florian Weimer <address@hidden> writes:
Robin> [...]

Florian> The last block of a file contains data after the actual
Florian> end of the file (back then, ReiserFS didn't optimize
Florian> these cases). This data is also present in the page
Florian> cache. You won't see it normally, because you cannot
Florian> read() beyond the end of the file, but mmap() can only
Florian> map complete pages, so you suddenly see the data (and it
Florian> was random data from kernel or user space, typically not
Florian> something which ever was on disk).

Robin> So I hope I understand your point better now, you cited an example
Robin> where Hans Reiser preferred optimization to correctness, source of
Robin> your prejudice.

Robin> I am not absolutely sure about this but I think that a POSIX kernel
Robin> should raise a SIGBUS when an application attempts an access between
Robin> the end of the file and the last page boundary. This would justify the
Robin> optimization.

  Hardware protection works with certain granularity.  You can't
provide sub-page protection/smaller pages. (And you really do not want
to, TLB cache is already scarse enough).

However

       "The system shall always zero-fill any partial page at the end
        of an object.  "
                                                 -- IEEE Std 1003.1-2001

So, this "optimization" is also a blatant violation of the standard
(if we assume reiser claims to be a POSIX system).

~velco




reply via email to

[Prev in Thread] Current Thread [Next in Thread]