From: Suparna Bhattacharya <suparna@in.ibm.com>
To: Andrew Morton <akpm@zip.com.au>
Cc: Rik van Riel <riel@conectiva.com.br>,
William Lee Irwin III <wli@holomorphy.com>,
lkml <linux-kernel@vger.kernel.org>
Subject: Re: [patch] get_request starvation fix
Date: Mon, 11 Feb 2002 23:05:37 +0530 [thread overview]
Message-ID: <20020211230537.A8661@in.ibm.com> (raw)
In-Reply-To: <3C639060.A68A42CA@zip.com.au> <3C6791C0.63CA2677@zip.com.au>
In-Reply-To: <3C6791C0.63CA2677@zip.com.au>; from akpm@zip.com.au on Mon, Feb 11, 2002 at 01:41:20AM -0800
There's something that's still bothering me - I wonder if I'm missing
something very obvious here.
> * So here's what we do:
> *
> * a) A READA requester fails if free_requests < batch_requests
> *
> * We don't want READA requests to prevent sleepers from ever
> * waking.
> *
> * When a process wants a new request:
> *
> * b) If free_requests == 0, the requester sleeps in FIFO manner.
> *
> * b) If 0 < free_requests < batch_requests and there are waiters,
> * we still take a request non-blockingly. This provides batching.
For a caller who just got an exclusive wakeup on the request queue,
this enables the woken up task to do batching and not sleep again on the
next request it needs. However since we use the same logic for new callers,
don't we still have those starvation issues ?
(i.e new callers end up stealing requests while there are sleepers,
given that wakeups will happen only if the queue builds up beyond the high
water mark)
> *
> * c) If free_requests >= batch_requests, the caller is immediately
> * granted a new request.
> *
> * When a request is released:
> *
> * d) If free_requests < batch_requests, do nothing.
On Mon, Feb 11, 2002 at 01:41:20AM -0800, Andrew Morton wrote:
> Andrew Morton wrote:
> >
> > Here's a patch which addresses the get_request starvation problem.
> >
>
> Sharp-eyed Suparna noticed that the algorithm still works if the
> low-water mark is set to zero (ie: rip it out) so I did that and
> the code is a little simpler. Updated patch at
> http://www.zip.com.au/~akpm/linux/2.4/2.4.18-pre9/make_request.patch
>
next prev parent reply other threads:[~2002-02-11 12:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-08 8:46 [patch] get_request starvation fix Andrew Morton
2002-02-08 8:57 ` Jens Axboe
2002-02-08 9:57 ` Andrew Morton
2002-02-08 9:10 ` Andrew Morton
2002-02-08 11:37 ` Rik van Riel
2002-02-08 18:28 ` Andrew Morton
2002-02-11 9:41 ` Andrew Morton
2002-02-11 17:35 ` Suparna Bhattacharya [this message]
2002-02-11 19:26 ` Andrew Morton
2002-02-14 6:00 ` Suparna Bhattacharya
2002-02-13 0:33 ` Jesse Barnes
-- strict thread matches above, loose matches on Subject: below --
2002-02-08 19:31 Dieter Nützel
[not found] <200202081932.GAA05943@mangalore.zipworld.com.au>
2002-02-08 19:44 ` Andrew Morton
2002-02-08 19:53 ` Dieter Nützel
2002-02-08 20:43 ` Rik van Riel
2002-02-09 1:56 rwhron
2002-02-12 23:13 Andrew Morton
2002-02-13 1:28 ` William Lee Irwin III
2002-02-15 17:23 ` Marcelo Tosatti
2002-02-16 7:32 ` Andrew Morton
2002-02-16 10:13 ` Daniel Phillips
2002-02-16 10:25 ` Andrew Morton
2002-02-13 13:55 rwhron
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=20020211230537.A8661@in.ibm.com \
--to=suparna@in.ibm.com \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
--cc=wli@holomorphy.com \
/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