[PARPORT] Re: 2.1.96 patches [new round robin regime]

Tim Waugh (tim@cyberelk.demon.co.uk)
Sat, 18 Apr 1998 16:45:10 +0100 (BST)

On Sat, 18 Apr 1998, Andrea Arcangeli wrote:

> You are perfectly right. We are currently using the waitlist only for
> device that are sleeping in parport_claim_or_block() while we can use it
> for all device and run the parport_claim() that own the port inside
> parport_release() for all devices (as it' s now done only for the device
> sleeping in ..claim_or_block()). The use of the waitlist will allow a real
> round-robin scheduling between devices.
> This patch will change the waitlist usage making it very smarter.

I think this is probably the way things should be done, yes. However, it
won't be done that way in 2.1 because of the freeze. I would like to only
send real bug-fixes to Linus.

So, for example, if the "if (no-one claimed) schedule();" patch I sent to
this list not long ago makes sense, I would rather send Linus that than
introduce more complexity to the wait_queues. In 2.3 maybe we can do
things like that.

> For devices that are not sleeping in parport_claim_or_block() and that
> provides a wakeup callback we could assume that the parport_claim() is run
> from the callback, but since it' s so simple change that I updated all
> (I hope ;-) pardevice to the new regime.
> If somebody will use the old wakeup callback style, recalling
> parport_claim() inside the wakeup callback, this will not broke. Only the
> guy will see a ton of messages like this:
> parport0: ppa already owner

I'm less keen on this aspect. I think we should think more carefully
about _why_ someone would be using the non-blocking interface in the first

> I also removed the sleep in parport_pc since I really don' t think it can
> help.

I've had zero feedback on this yet, so I'll leave it in for now. If
people can compile without the sleep and let me know if they have
success/failure, that would be good.

> This patch also automatically fix the LP_PREEMPT() define in lp.h that
> currently is wrong (I noticed it thinking about your last email).

I've only skim-read your patch - please can you explain the problem with
the macro, and how it is fixed?


-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --

This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:38 EST