Re: [PATCH] virtio_console: Add support for multiple ports forgeneric guest and host communication

From: Amit Shah
Date: Thu Oct 01 2009 - 09:52:15 EST


On (Thu) Oct 01 2009 [14:04:37], Christian Borntraeger wrote:
> Am Donnerstag 01 Oktober 2009 13:58:01 schrieben Sie:
> > I spawned two ports; one doing 'find /' and the other transferring a
> > 800M file from the host to the guest, both running at the same time.
> > This is on top of the latest Linus tree + my patches. It works fine.
> >
> > Can you give me any additional info that can help me nail this down?
>
> This is just a wild guess: My guest has 8 cpus and virtio requires that users do
> a proper locking. But as far as I see you use schedule_work which should be
> single threaded.
> Or maybe this is an existing bug that is just exposed by your patch - dont know.

I think there might be two bugs. One is the readbuf_head list needs
some locks around its operations. The readbuf_head list is a per-port
list where buffers received from the host for a port are stored.
They're taken off that list when userspace issues read() requests.

The other bug is the virtio one that you saw. I'll try to see how that
one gets triggered.

Thanks,
Amit
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/