lkml.org 
[lkml]   [2009]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [FOR REVIEW, PATCH 2/2] introduce "struct wait_opts" to simplify do_wait() pathes
On 05/07, Roland McGrath wrote:
>
> > Yes, I considered this option too. But since (I hope) you do not have
> > a strong opinion on this, I'd prefer to keep the code as is. This way
> > do_wait() looks more symmetrical wrt to other helpers. And we don't
> > copy args twice.
>
> I don't feel strongly. But I do think that those two repeated assignment
> blocks are more to read and harder to read, and more error-prone for drift
> in future changes (vs prototype changes getting quick compilation errors).
> do_wait() is not "another helper", it's the main function.

I must admit, I do not agree. I feel the opposite. Yes we have 2 repeated
assignment blocks, but there are not exactly equal, and imho the difference
is more visible this way.

That said. This is not the technical issue, I can't "prove" I am right and
of course I may be wrong. I think we should follow the "maintaner is always
right" rule ;)

I'll send this change as another cleanup on top of the new series.

OK ?

> On machines
> with 6 argument registers (everything but x86-32?), the compiler probably
> does fine making the callers' register shuffling be free. On x86-32, a few
> cache-hot stack stores and loads are in the tiny noise vs the whole cost of
> this hairy syscall, and IMHO don't compare to source maintainability issues.

Yes, I agree.

Oleg.



\
 
 \ /
  Last update: 2009-05-07 09:47    [W:0.039 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site