Re: [patch] 2.4.19-pre10-ac2: O(1) scheduler merge, -A3.

Ingo Molnar (mingo@elte.hu)
Mon, 17 Jun 2002 06:07:35 +0200 (CEST)


On 16 Jun 2002, Robert Love wrote:

> > > @@ -1790,4 +1790,4 @@
> > > while (!cpu_rq(cpu_logical_map(cpu))->migration_thread)
> > > schedule_timeout(2);
> > > }
> > > -#endif
> > > +#endif /* CONFIG_SMP */
> >
> > and this is just silly... I can see the point in doing #if comments in
> > include files, but the nesting here is just so obvious.
>
> I disagree, but OK. I like having the #if marked by the #endif if they
> are not close... and elsewhere through the kernel mirrors this. While I
> can scroll up and look - assuming the nesting is sane - a simple comment
> makes that clear so what is the pain?

and in this specific sched.c case, are we going to put in magic comments
every 25 lines inbetween:

/* this is CONFIG_SMP conditional code */

just to save us some scrolling up? I dont think #endif is special wrt.
such comments.

in header files the #ifdef jungle often makes proper nesting hard. In
those cases putting comments to #else and #endif makes a real difference
in readability. But in sched.c there is not a single nested #ifdef. (and
that's very much intentional.)

Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/