[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] Need help with fixing the Xen waitqueue feature
- To: Olaf Hering <olaf@xxxxxxxxx>
- From: Keir Fraser <keir.xen@xxxxxxxxx>
- Date: Wed, 23 Nov 2011 19:21:46 +0000
- Cc: xen-devel@xxxxxxxxxxxxxxxxxxx, Jan Beulich <JBeulich@xxxxxxxx>
- Delivery-date: Wed, 23 Nov 2011 19:22:46 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=user-agent:date:subject:from:to:cc:message-id:thread-topic :thread-index:in-reply-to:mime-version:content-type :content-transfer-encoding; bh=M5c+wURR0XXk1C3IipS5g7gofY3BJdXIqRa6i66pcf4=; b=ZIW32mRwtwjfjpH9JxPI/0Xt180fTFVTjGjOK08I/NUaToMqIumFrl97UMlFMsD5iZ gi+wvOt0zuWwYueKcL8JHS5D04gTprDCjStgK1j5ovc9GYpPzjYMK/BmHPE8H0dohkHP gI/WPGhB0YS02B3tx7A5bIStbDasy+SF9q3BI=
- List-id: Xen developer discussion <xen-devel.lists.xensource.com>
- Thread-index: AcyqFSPigRbmOh5ymkyxVkLvJHSMcg==
- Thread-topic: [Xen-devel] Need help with fixing the Xen waitqueue feature
On 23/11/2011 18:31, "Olaf Hering" <olaf@xxxxxxxxx> wrote:
> On Wed, Nov 23, Keir Fraser wrote:
>
>> We have quite a big waitqueue problem actually. The current scheme of
>> per-cpu stacks doesn't work nicely, as the stack pointer will change if a
>> vcpu goes to sleep and then wakes up on a different cpu. This really doesn't
>> work nicely with preempted C code, which may implement frame pointers and/or
>> arbitrarily take the address of on-stack variables. The result will be
>> hideous cross-stack corruptions, as these frame pointers and cached
>> addresses of automatic variables will reference the wrong cpu's stack!
>> Fixing or detecting this in general is not possible afaics.
>
> Yes, I was thinking about that wakeup on different cpu as well.
> As a quick fix/hack, perhaps the scheduler could make sure the vcpu
> wakes up on the same cpu?
Could save old affinity and then vcpu_set_affinity. That will have to do for
now. Actually it should work okay as long as toolstack doesn't mess with
affinity meanwhile. I'll sort out a patch for this.
-- Keir
> Olaf
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel