2006-10-14 18:02:15

by Thomas Maier

[permalink] [raw]
Subject: [PATCH 2/2] 2.6.19-rc1-mm1 pktcdvd: bio write congestion

Hello,

this adds a bio write queue congestion control
to the pktcdvd driver with fixed on/off marks.
It prevents that the driver consumes a unlimited
amount of write requests.

Signed-off-by: Thomas Maier <[email protected]>


Attachments:
pktcdvd-2-wqueue-congestion.patch (4.01 kB)

2006-10-14 18:55:36

by Peter Osterlund

[permalink] [raw]
Subject: Re: [PATCH 2/2] 2.6.19-rc1-mm1 pktcdvd: bio write congestion

"Thomas Maier" <[email protected]> writes:

> Hello,
>
> this adds a bio write queue congestion control
> to the pktcdvd driver with fixed on/off marks.
> It prevents that the driver consumes a unlimited
> amount of write requests.

Thanks, this looks good in principle, but I think it can be
implemented in a simpler way.

Jens, can I please ask your opinion. Would it make sense to export the
clear_queue_congested() and set_queue_congested() functions in
ll_rw_blk.c so that the pktcdvd driver can use them? Something like
this patch from a few years ago:

http://marc.theaimsgroup.com/?l=linux-kernel&m=109378210610508&w=2

--
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340

2006-10-15 18:16:30

by Jens Axboe

[permalink] [raw]
Subject: Re: [PATCH 2/2] 2.6.19-rc1-mm1 pktcdvd: bio write congestion

On Sat, Oct 14 2006, Peter Osterlund wrote:
> "Thomas Maier" <[email protected]> writes:
>
> > Hello,
> >
> > this adds a bio write queue congestion control
> > to the pktcdvd driver with fixed on/off marks.
> > It prevents that the driver consumes a unlimited
> > amount of write requests.
>
> Thanks, this looks good in principle, but I think it can be
> implemented in a simpler way.
>
> Jens, can I please ask your opinion. Would it make sense to export the
> clear_queue_congested() and set_queue_congested() functions in
> ll_rw_blk.c so that the pktcdvd driver can use them? Something like
> this patch from a few years ago:
>
> http://marc.theaimsgroup.com/?l=linux-kernel&m=109378210610508&w=2

It definitely would. Did you test, and did it work well for you? I think
it's the right approach.

--
Jens Axboe

2006-10-16 08:48:21

by Thomas Maier

[permalink] [raw]
Subject: Re: Re: [PATCH 2/2] 2.6.19-rc1-mm1 pktcdvd: bio write congestion

Hello,

the congestion control will work with both code changes, but i am
not sure, if using clear_queue_congested() and blk_congestion_wait()
is the right thing to use here: it works on global level. Any other
thread/driver/etc. can do a clear_queue_congested() and wake
up anyone waiting on this global write or read wait queue, resulting to
unneeded task switches.
The driver local solution (own waitqueue) would prevent this.....

-Thomas Maier


----- original Nachricht --------

Betreff: Re: [PATCH 2/2] 2.6.19-rc1-mm1 pktcdvd: bio write congestion
Gesendet: So 15 Okt 2006 20:16:31 CEST
Von: "Jens Axboe"<[email protected]>

> On Sat, Oct 14 2006, Peter Osterlund wrote:
> > "Thomas Maier" <[email protected]> writes:
> >
> > > Hello,
> > >
> > > this adds a bio write queue congestion control
> > > to the pktcdvd driver with fixed on/off marks.
> > > It prevents that the driver consumes a unlimited
> > > amount of write requests.
> >
> > Thanks, this looks good in principle, but I think it can be
> > implemented in a simpler way.
> >
> > Jens, can I please ask your opinion. Would it make sense to export the
> > clear_queue_congested() and set_queue_congested() functions in
> > ll_rw_blk.c so that the pktcdvd driver can use them? Something like
> > this patch from a few years ago:
> >
> >
> http://marc.theaimsgroup.com/?l=linux-kernel&m=109378210610508&w=2
>
> It definitely would. Did you test, and did it work well for you? I think
> it's the right approach.
>
> --
> Jens Axboe
>
>

--- original Nachricht Ende ----









2006-10-16 19:32:39

by Peter Osterlund

[permalink] [raw]
Subject: Re: Re: [PATCH 2/2] 2.6.19-rc1-mm1 pktcdvd: bio write congestion

On Mon, 16 Oct 2006, [email protected] wrote:

> the congestion control will work with both code changes, but i am
> not sure, if using clear_queue_congested() and blk_congestion_wait()
> is the right thing to use here: it works on global level. Any other
> thread/driver/etc. can do a clear_queue_congested() and wake
> up anyone waiting on this global write or read wait queue, resulting to
> unneeded task switches.
> The driver local solution (own waitqueue) would prevent this.....

But it would make the driver more complex. How many extra task switches
can you get, and how much CPU time does that consume? If it is negligible
I think it's better to keep the code simple.

--
Peter Osterlund - [email protected]
http://web.telia.com/~u89404340