Re: [PATCH v2] loop: Limit the number of requests in the bio list

2012-11-13 Thread Lukáš Czerner
On Thu, 8 Nov 2012, Andrew Morton wrote: > Date: Thu, 8 Nov 2012 11:14:18 -0800 > From: Andrew Morton > To: Lukas Czerner > Cc: ax...@kernel.dk, dchin...@redhat.com, jmo...@redhat.com, > linux-kernel@vger.kernel.org > Subject: Re: [PATCH v2] loop: Limit the number of r

Re: [PATCH v2] loop: Limit the number of requests in the bio list

2012-11-13 Thread Lukáš Czerner
On Thu, 8 Nov 2012, Jeff Moyer wrote: > Date: Thu, 08 Nov 2012 16:53:01 -0500 > From: Jeff Moyer > To: Lukas Czerner > Cc: ax...@kernel.dk, dchin...@redhat.com, linux-kernel@vger.kernel.org > Subject: Re: [PATCH v2] loop: Limit the number of requests in the bio list > >

Re: [PATCH v2] loop: Limit the number of requests in the bio list

2012-11-13 Thread Lukáš Czerner
On Fri, 9 Nov 2012, Jens Axboe wrote: > Date: Fri, 09 Nov 2012 08:34:03 +0100 > From: Jens Axboe > To: Andrew Morton > Cc: Lukas Czerner , dchin...@redhat.com, > jmo...@redhat.com, linux-kernel@vger.kernel.org > Subject: Re: [PATCH v2] loop: Limit the number of reques

Re: [PATCH v2] loop: Limit the number of requests in the bio list

2012-11-08 Thread Jens Axboe
On 2012-11-08 20:14, Andrew Morton wrote: > On Tue, 16 Oct 2012 11:21:45 +0200 > Lukas Czerner wrote: > >> 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

Re: [PATCH v2] loop: Limit the number of requests in the bio list

2012-11-08 Thread Jeff Moyer
Lukas Czerner writes: > + if (lo->lo_bio_count >= lo->lo_queue->nr_requests) { > + unsigned int nr; > + spin_unlock_irq(&lo->lo_lock); > + nr = lo->lo_queue->nr_requests - (lo->lo_queue->nr_requests/8); > + wait_event_interruptible(lo->lo_req_wa

Re: [PATCH v2] loop: Limit the number of requests in the bio list

2012-11-08 Thread Jeff Moyer
Andrew Morton writes: > On Tue, 16 Oct 2012 11:21:45 +0200 > Lukas Czerner wrote: > >> 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 ev

Re: [PATCH v2] loop: Limit the number of requests in the bio list

2012-11-08 Thread Andrew Morton
On Tue, 16 Oct 2012 11:21:45 +0200 Lukas Czerner wrote: > 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 w