mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Woodhouse <dwmw2@infradead.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: David Miller <davem@davemloft.net>,
	linux-kernel@vger.kernel.org, akpm@osdl.org,
	Jens Axboe <axboe@suse.de>
Subject: Re: cfq-iosched.c:RB_CLEAR_COLOR
Date: Wed, 21 Jun 2006 08:31:53 +0100	[thread overview]
Message-ID: <1150875113.3176.506.camel@pmac.infradead.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0606201800320.5498@g5.osdl.org>

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


  reply	other threads:[~2006-06-21  7:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-21  0:34 cfq-iosched.c:RB_CLEAR_COLOR David Miller
2006-06-21  1:03 ` cfq-iosched.c:RB_CLEAR_COLOR Linus Torvalds
2006-06-21  7:31   ` David Woodhouse [this message]
2006-06-21  7:38     ` cfq-iosched.c:RB_CLEAR_COLOR Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1150875113.3176.506.camel@pmac.infradead.org \
    --to=dwmw2@infradead.org \
    --cc=akpm@osdl.org \
    --cc=axboe@suse.de \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®