This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: linuxthreads tst-cancel4.c et al.


On Mon, Apr 11, 2005 at 01:12:53PM -0700, David S. Miller wrote:
> 
> While debugging some sparc testsuite failures I noticed this
> issue.  The tst-calcel4.c test tries to do a large write to
> a pipe in order to block.
> 
> With current 2.6.x kernels, the internal PIPE buffering the kernel
> uses can be enormous, and the writes done by tst-cancel4.c are not
> large enough thus the write() call does not block and the test fails.
> (at least this is true on my sparc64 system which has a page size of 8K,
> which multiplied by include/linux/pipe_fs_i.h:PIPE_BUFFERS is 128K, the
> tst-cancel4.c tries a 100000 byte write which is smaller)
> 
> We can keep upping the buffer size, or we can try and use something
> more reliable to generate a write() which blocks.  Perhaps an AF_UNIX
> socket, or a non-blocking write to a file which is locked.  I don't
> have any really good ideas...
> 
> Comments?

I couldn't think of anything - see my earlier posts about
nptl/tst-cancel17.c, which is the same problem.  Linus clarified that
there is no reason to expect writes to a pipe to block, so the numbers
are liable to change again the next time he gets inspired.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]