lkml.org 
[lkml]   [2012]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] loop: Limit the number of requests in the bio list
Date
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
--
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: 2012-10-03 17:01    [W:0.125 / U:0.576 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site