From: Yang Zhang Subject: Re: [Query] Deadlock condition due to virtqueue_add buffer allocation Date: Tue, 1 Aug 2017 11:12:42 +0800 Message-ID: <8b774b0a-34a0-7f3a-35f5-fa8300993ec7@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Rik van Riel To: Nitesh Narayan Lal , kvm@vger.kernel.org Return-path: Received: from mail-oi0-f65.google.com ([209.85.218.65]:37080 "EHLO mail-oi0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740AbdHADMr (ORCPT ); Mon, 31 Jul 2017 23:12:47 -0400 Received: by mail-oi0-f65.google.com with SMTP id j194so459336oib.4 for ; Mon, 31 Jul 2017 20:12:46 -0700 (PDT) In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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