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

2012-11-15 Thread Jens Axboe
edhat.com, a...@linux-foundation.org >> Subject: Re: [PATCH v3] loop: Limit the number of requests in the bio list >> >> On 2012-11-14 02:02, Lukáš Czerner wrote: >>> On Tue, 13 Nov 2012, Jens Axboe wrote: >>> >>>> Date: Tue, 13 Nov 2012 09:42:58 -0700 >>

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

2012-11-15 Thread Lukáš Czerner
er.kernel.org, linux-fsde...@vger.kernel.org, > >> jmo...@redhat.com, a...@linux-foundation.org > >> Subject: Re: [PATCH v3] loop: Limit the number of requests in the bio list > >> > >>> @@ -489,6 +491,12 @@ static void loop_make_request(struct request_qu

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

2012-11-14 Thread Jens Axboe
edhat.com, a...@linux-foundation.org >> Subject: Re: [PATCH v3] loop: Limit the number of requests in the bio list >> >>> @@ -489,6 +491,12 @@ static void loop_make_request(struct request_queue *q, >>> struct bio *old_bio) >>> goto out; >>> if

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

2012-11-14 Thread Lukáš Czerner
On Tue, 13 Nov 2012, Jens Axboe wrote: > Date: Tue, 13 Nov 2012 09:42:58 -0700 > From: Jens Axboe > To: Lukas Czerner > Cc: linux-kernel@vger.kernel.org, linux-fsde...@vger.kernel.org, > jmo...@redhat.com, a...@linux-foundation.org > Subject: Re: [PATCH v3] loop: L

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

2012-11-13 Thread Jens Axboe
> @@ -489,6 +491,12 @@ static void loop_make_request(struct request_queue *q, > struct bio *old_bio) > goto out; > if (unlikely(rw == WRITE && (lo->lo_flags & LO_FLAGS_READ_ONLY))) > goto out; > + if (lo->lo_bio_count >= q->nr_congestion_on) { > +

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

2012-11-13 Thread Jeff Moyer
Lukas Czerner 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 s

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

2012-11-13 Thread Lukas Czerner
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