[Top][All Lists]

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

Re: [PATCH,HURD][RFC] hurdselect: Step7x, almost complete rewrite finish

From: Samuel Thibault
Subject: Re: [PATCH,HURD][RFC] hurdselect: Step7x, almost complete rewrite finished
Date: Fri, 15 Feb 2013 00:31:16 +0100
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Svante Signell, le Fri 15 Feb 2013 00:18:16 +0100, a écrit :
> Well, I might say I have some C programming experience

"some" is not enough to properly deal with something as complex as
select :)

> > Svante Signell, le Wed 13 Feb 2013 06:51:29 +0100, a écrit :
> > > On Wed, 2013-02-13 at 01:53 +0100, Samuel Thibault wrote:
> > > > Samuel Thibault, le Wed 13 Feb 2013 01:42:53 +0100, a écrit :
> > > > > I have rewritten your changes as seen below,
> > > - the rewritten code is faster than the old one. In the old code no
> > > delay is needed for the POLL case but is for the rewritten code. i.e.
> > > it's faster. (irrespective of moving timeouts to the server side or not)
> > 
> > I don't understand what you mean.  What delay are you talking about?
> > The only delay in by branch is the delay requested by the user.
> Well, with my code I need a timeout of 1ms for poll, with the old code I
> don't.

That 1ms is completely got ridden of by Richard's changes. I don't
understand what problem you are still seeing.

> > > - regarding programming style: Let's assume you develop a microprocessor
> > > containing several millions of gates. Which solution is most easily
> > > developed, maintained, reviewed and bug fixed: A flat netlist design or
> > > a hierarchical design? Just ask the chip developers, like Intel and AMD.
> > 
> > That's why keeping code factorized is important.
> This argument I cannot buy: Please explain factorized code.

Keeping in common everything that would be the same in the various code

> Hierarchical versus flat (yes this applies to SW too).

For me flat would be having hurdselect.c and hurdpoll.c

Having a separate hurddoselect.c with a function containing the shared
code would have both factorization and hierarchy, but the semantic of
the function gets tricky, and it'd be easy to miss thing.

Select/poll *are* complex, you *have* to keep the whole picture in mind.

> And as a final note: My latest version of hurdselect.c works,
> irrespective of what gets implemented for Hurd ;.)

No, it doesn't. There are quite a few ways in which it will break.


reply via email to

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