emacs-devel
[Top][All Lists]
Advanced

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

Re: oops? read/write vs type of length parameter


From: Paul Eggert
Subject: Re: oops? read/write vs type of length parameter
Date: Tue, 12 Apr 2011 08:43:58 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8

>> Can't that be used (with perhaps more like 64 MiB than 64 KiB per
>> call) for these large files too?
> That would just slow down Emacs's I/O for no good reason. 

There may be some good reason, actually.  In some cases
there are serious bugs with Linux kernels before 2.6.16,
when an application writes huge buffers.  That what was
MAX_RW_COUNT was introduced for, inside the kernel.
Now, Linux 'write' calls never return more than that value.
This just papers over some lower-level bugs, but there it is.

With this in mind, perhaps Emacs should refuse to write more than
MAX_RW_COUNT (i.e., INT_MAX - 4095) bytes at a time, regardless
of whether the kernel itself imposes the limit, as larger writes are
likely to tickle bugs in older Linux kernels.

See, for example:

https://bugzilla.redhat.com/show_bug.cgi?format=multiple&id=612839



reply via email to

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