Re: [patch, rfc]: block layer, queues

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Sun Apr 16 2000 - 09:16:27 EST


 
+ request_queue_t *q = &blk_dev[DAC960_MAJOR +
Controller->ControllerNumber].request_queue;
[...]
- spin_unlock(&io_request_lock);
+ spin_unlock(&q->request_lock);

Are you sure that you don't introduce lots of SMP races, e.g. in drivers
that support multiple majors?

+static struct request *__get_request_wait(request_queue_t *q,
+ struct list_head *list,
kdev_t dev)
[...]
+again:
+ spin_lock_irqsave(&q->request_lock, flags);
+ rq = get_request(q, list, dev);
+ spin_unlock_irqrestore(&q->request_lock, flags);
+ if (rq)
+ return rq;
+
+ generic_unplug_device(q);
+ goto again;

I couldn't find where you schedule() in that function.

And I would prefer if we could use spin_lock_irq() instead of irqsave()
if a function is never called with disabled interrupts: it saves stack
space and it's faster.

--
	Manfred

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 23 2000 - 21:00:09 EST