From: "Lukáš Czerner" <lczerner@redhat.com>
To: Jeff Moyer <jmoyer@redhat.com>
Cc: "Dave Chinner" <dchinner@redhat.com>,
"Lukáš Czerner" <lczerner@redhat.com>,
"Jens Axboe" <axboe@kernel.dk>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] loop: Limit the number of requests in the bio list
Date: Wed, 3 Oct 2012 17:01:17 +0200 (CEST) [thread overview]
Message-ID: <alpine.LFD.2.00.1210031659480.18540@localhost> (raw)
In-Reply-To: <x49txubvd9d.fsf@segfault.boston.devel.redhat.com>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 2274 bytes --]
On Wed, 3 Oct 2012, Jeff Moyer wrote:
> Date: Wed, 03 Oct 2012 10:30:54 -0400
> From: Jeff Moyer <jmoyer@redhat.com>
> To: Dave Chinner <dchinner@redhat.com>
> Cc: Lukáš Czerner <lczerner@redhat.com>, Jens Axboe <axboe@kernel.dk>,
> linux-kernel@vger.kernel.org
> Subject: Re: [PATCH] loop: Limit the number of requests in the bio list
>
> Dave Chinner <dchinner@redhat.com> writes:
>
> > On Tue, Oct 02, 2012 at 10:52:05AM +0200, Lukáš Czerner wrote:
> >> On Mon, 1 Oct 2012, Jeff Moyer wrote:
> >> > Date: Mon, 01 Oct 2012 12:52:19 -0400
> >> > From: Jeff Moyer <jmoyer@redhat.com>
> >> > To: Lukas Czerner <lczerner@redhat.com>
> >> > Cc: Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org,
> >> > Dave Chinner <dchinner@redhat.com>
> >> > Subject: Re: [PATCH] loop: Limit the number of requests in the bio list
> >> >
> >> > Lukas Czerner <lczerner@redhat.com> writes:
> >> >
> >> > > Currently there is not limitation of number of requests in the loop bio
> >> > > list. This can lead into some nasty situations when the caller spawns
> >> > > tons of bio requests taking huge amount of memory. This is even more
> >> > > obvious with discard where blkdev_issue_discard() will submit all bios
> >> > > for the range and wait for them to finish afterwards. On really big loop
> >> > > devices this can lead to OOM situation as reported by Dave Chinner.
> >> > >
> >> > > With this patch we will wait in loop_make_request() if the number of
> >> > > bios in the loop bio list would exceed 'nr_requests' number of requests.
> >> > > We'll wake up the process as we process the bios form the list.
> >> >
> >> > I think you might want to do something similar to what is done for
> >> > request_queues by implementing a congestion on and off threshold. As
> >> > Jens writes in this commit (predating the conversion to git):
> >>
> >> Right, I've had the same idea. However my first proof-of-concept
> >> worked quite well without this and my simple performance testing did
> >> not show any regression.
>
> Did you look at system time?
>
> -Jeff
Hi, none of the times showed any significant difference, there was
not any pattern suggesting a problem. Also the system time is included
in the real time, so it would show anyway I guess.
-Lukas
next prev parent reply other threads:[~2012-10-03 15:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 17:33 [PATCH] loop: Limit the number of requests in the bio list Lukas Czerner
2012-10-01 16:52 ` Jeff Moyer
2012-10-02 8:52 ` Lukáš Czerner
2012-10-02 19:59 ` Dave Chinner
2012-10-03 14:30 ` Jeff Moyer
2012-10-03 15:01 ` Lukáš Czerner [this message]
2012-10-03 15:05 ` Jeff Moyer
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=alpine.LFD.2.00.1210031659480.18540@localhost \
--to=lczerner@redhat.com \
--cc=axboe@kernel.dk \
--cc=dchinner@redhat.com \
--cc=jmoyer@redhat.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox