lkml.org 
[lkml]   [2006]   [Jun]   [21]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: cfq-iosched.c:RB_CLEAR_COLOR
FromDavid Woodhouse <>
DateWed, 21 Jun 2006 08:31:53 +0100
On Tue, 2006-06-20 at 18:03 -0700, Linus Torvalds wrote:
> > There were two explicit calls in the cfq-iosched.c file
> > to RB_CLEAR_COLOR, only the one in cfq_del_crq_rb() got
> > removed so the build fails.

Apologies for that; the new one got added only last week, and escaped my
attention.

> I think the right fix is to just remove the RB_CLEAR_COLOR() call, since 
> the memset will set everything to 0/NULL, which should be the correct 
> initialization these days anyway.
> 
> David (the other one - dwmw2), pls confirm? 

Yes, that looks correct. Other code, including the AS scheduler, was
(ab)using the colour field by storing a 'RB_NONE' value which was
neither red nor black to mark an 'off-tree' node, then checking for it
with ON_RB(). I changed that scheme -- we now set the node's parent
pointer to point to itself to mark an off-tree node. 

However, the cfq scheduler looks like it only inherited the macros from
AS, and was never actually _checking_ if a given node was on-tree or
not. So just dropping the magic initialisation stuff there is fine.

-- 
dwmw2

-
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/

\
 
 \ /
  Last update: 2006-06-21 09:34    [from the cache]
©2003-2008