All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: Benoit Boissinot <bboissin@gmail.com>
Cc: Xiaoning Ding <dingxn@cse.ohio-state.edu>, linux-kernel@vger.kernel.org
Subject: Re: a bug in AS scheduler?
Date: Wed, 28 Feb 2007 14:34:58 +0100	[thread overview]
Message-ID: <20070228133458.GC3733@kernel.dk> (raw)
In-Reply-To: <40f323d00702280525g3d898a9bm1297dc32b8f7fda2@mail.gmail.com>

On Wed, Feb 28 2007, Benoit Boissinot wrote:
> On 2/28/07, Jens Axboe <jens.axboe@oracle.com> wrote:
> >On Tue, Feb 27 2007, Xiaoning Ding wrote:
> >> Hi,
> >>
> >> I am reading the source code AS scheduler in 2.6.18(as-ioscheduler.c).
> >> In function as_close_req, variable delay is in millisecond, while
> >> ad->antic_expire is in jiffies. Doesn't the comparison of delay and
> >> ad->antic_expire make any problem?
> >> The related source code is quoted blow:
> >>
> >>       if (ad->antic_status == ANTIC_OFF || !ad->ioc_finished)
> >>               delay = 0;
> >>       else
> >>               delay = ((jiffies - ad->antic_start) * 1000) / HZ;
> >
> >antic_start is in jiffies, the difference is here multiplied by 1000 and
> >divided by HZ to turn it into msecs. so delay is in msecs.
> >
> I am pretty sure Xiaoning was talking about antic_expire, particularly
> this comparison:
> 
>     else if (delay <= 20 && delay <= ad->antic_expire)

Ah, I misread the name. That does look like a bug, antic_expire is in
jiffies.

-- 
Jens Axboe


  reply	other threads:[~2007-02-28 13:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-28  4:22 a bug in AS scheduler? Xiaoning Ding
2007-02-28 12:10 ` Jens Axboe
2007-02-28 13:25   ` Benoit Boissinot
2007-02-28 13:34     ` Jens Axboe [this message]
2007-02-28 15:33       ` Xiaoning Ding

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=20070228133458.GC3733@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=bboissin@gmail.com \
    --cc=dingxn@cse.ohio-state.edu \
    --cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.