All of lore.kernel.org
 help / color / mirror / Atom feed
* [Query] Deadlock condition due to virtqueue_add buffer allocation
@ 2017-07-28 20:34 Nitesh Narayan Lal
  2017-08-01  3:12 ` Yang Zhang
  0 siblings, 1 reply; 3+ messages in thread
From: Nitesh Narayan Lal @ 2017-07-28 20:34 UTC (permalink / raw)
  To: kvm; +Cc: Rik van Riel

Hi,

I am working on the guest page hinting support with Rik.
As per my implementation when pages are freed, they are added to a
cpu-local list. Once that list fills up, the pages need to be passed to
the hypervisor. I am currently using a seqlock to ensure page allocation
does not allocate pages while they are being freed by the hypervisor.
This list is passed to the hypervisor using virtio_balloon
infrastructure. As per the current flow virtqueue_add() requires a
memory allocation, which leads to a deadlock condition.

What should be the right way to get around this?

Looking forward for the suggestions.

-- 

Regards
Nitesh

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Query] Deadlock condition due to virtqueue_add buffer allocation
  2017-07-28 20:34 [Query] Deadlock condition due to virtqueue_add buffer allocation Nitesh Narayan Lal
@ 2017-08-01  3:12 ` Yang Zhang
  2017-08-01 13:15   ` Nitesh Narayan Lal
  0 siblings, 1 reply; 3+ messages in thread
From: Yang Zhang @ 2017-08-01  3:12 UTC (permalink / raw)
  To: Nitesh Narayan Lal, kvm; +Cc: Rik van Riel

On 2017/7/29 4:34, Nitesh Narayan Lal wrote:
> Hi,
>
> I am working on the guest page hinting support with Rik.
> As per my implementation when pages are freed, they are added to a
> cpu-local list. Once that list fills up, the pages need to be passed to
> the hypervisor. I am currently using a seqlock to ensure page allocation
> does not allocate pages while they are being freed by the hypervisor.
> This list is passed to the hypervisor using virtio_balloon
> infrastructure. As per the current flow virtqueue_add() requires a
> memory allocation, which leads to a deadlock condition.
>
> What should be the right way to get around this?
>
> Looking forward for the suggestions.
>

Hi Nitesh,

I am interesting on the idea. Could you give more details of the 
background? What page hinting can help and what's the expected usage model?

-- 
Yang
Alibaba Cloud Computing

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Query] Deadlock condition due to virtqueue_add buffer allocation
  2017-08-01  3:12 ` Yang Zhang
@ 2017-08-01 13:15   ` Nitesh Narayan Lal
  0 siblings, 0 replies; 3+ messages in thread
From: Nitesh Narayan Lal @ 2017-08-01 13:15 UTC (permalink / raw)
  To: Yang Zhang, kvm; +Cc: Rik van Riel


[-- Attachment #1.1: Type: text/plain, Size: 1321 bytes --]



On 07/31/2017 11:12 PM, Yang Zhang wrote:
> On 2017/7/29 4:34, Nitesh Narayan Lal wrote:
>> Hi,
>>
>> I am working on the guest page hinting support with Rik.
>> As per my implementation when pages are freed, they are added to a
>> cpu-local list. Once that list fills up, the pages need to be passed to
>> the hypervisor. I am currently using a seqlock to ensure page allocation
>> does not allocate pages while they are being freed by the hypervisor.
>> This list is passed to the hypervisor using virtio_balloon
>> infrastructure. As per the current flow virtqueue_add() requires a
>> memory allocation, which leads to a deadlock condition.
>>
>> What should be the right way to get around this?
>>
>> Looking forward for the suggestions.
>>
>
> Hi Nitesh,
>
> I am interesting on the idea. Could you give more details of the
> background? What page hinting can help and what's the expected usage
> model?
>
Hi Yang,

Basically page hinting support will help in handing of free memory
between the guest and the host rapidly and transparently. It will also
enable the guest to reuse the memory again with the use of MADV_FREE on
the host side.
I will be sharing the first patch-set soon, please feel free to make any
suggestion which you feel are required.

-- 
Regards
Nitesh


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-08-01 13:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-28 20:34 [Query] Deadlock condition due to virtqueue_add buffer allocation Nitesh Narayan Lal
2017-08-01  3:12 ` Yang Zhang
2017-08-01 13:15   ` Nitesh Narayan Lal

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.