Re: futex.c and EWOULDBLOCK vs. EAGAIN patch

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

 



On Sat, May 15, 2010 at 01:27:49PM -0400, Kyle McMartin wrote:
> It's a two instruction penalty(*) in the kernel syscall return path, just
> do it there. I've got a box at Red Hat with all the source to the whole
> damn world on it we run greps against to look for dumb stuff like memcpy
> bugs.

Why look for it? Just change the kernel to not ever return one of them.

>  I'll toss a grep for EAGAIN and not EWOULDBLOCK and vice versa and
> see how much stuff might b0rk.

Please do...I'd be curious to see which programs might be affected and
if we care.

> We discussed this a couple years ago, and it ended up being a complete
> rats nest of error returns that needed fixing.
> 
> regards, Kyle.
> 
> *: CMPI,N(=), LDI, maybe a third since I don't remember how sign
> extension works off the top of my head.

Mispredicted branches cost something like 20-25 cycles. I forgot now but I
do know they aren't cheap.

I'd rather not add more hacks for this they are unlikely to ever
be removed again. I'd rather have status quo than add some hack
to the syscall return path.

thanks,
grant

--
To unsubscribe from this list: send the line "unsubscribe linux-parisc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux SoC]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux