From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751500AbeAZD2u (ORCPT ); Thu, 25 Jan 2018 22:28:50 -0500 Received: from mga14.intel.com ([192.55.52.115]:9749 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751174AbeAZD2t (ORCPT ); Thu, 25 Jan 2018 22:28:49 -0500 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,414,1511856000"; d="scan'208";a="198919014" Message-ID: <5A6AA107.3000607@intel.com> Date: Fri, 26 Jan 2018 11:31:19 +0800 From: Wei Wang User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: "Michael S. Tsirkin" CC: virtio-dev@lists.oasis-open.org, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org, kvm@vger.kernel.org, linux-mm@kvack.org, mhocko@kernel.org, akpm@linux-foundation.org, pbonzini@redhat.com, liliang.opensource@gmail.com, yang.zhang.wz@gmail.com, quan.xu0@gmail.com, nilal@redhat.com, riel@redhat.com Subject: Re: [virtio-dev] Re: [PATCH v25 2/2] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_HINT References: <1516871646-22741-1-git-send-email-wei.w.wang@intel.com> <1516871646-22741-3-git-send-email-wei.w.wang@intel.com> <20180125154708-mutt-send-email-mst@kernel.org> <5A6A871C.6040408@intel.com> <20180126042649-mutt-send-email-mst@kernel.org> In-Reply-To: <20180126042649-mutt-send-email-mst@kernel.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/26/2018 10:42 AM, Michael S. Tsirkin wrote: > On Fri, Jan 26, 2018 at 09:40:44AM +0800, Wei Wang wrote: >> On 01/25/2018 09:49 PM, Michael S. Tsirkin wrote: >>> On Thu, Jan 25, 2018 at 05:14:06PM +0800, Wei Wang wrote: >>> >> The controversy is that the free list is not static >> once the lock is dropped, so everything is dynamically changing, including >> the state that was recorded. The method we are using is more prudent, IMHO. >> How about taking the fundamental solution, and seek to improve incrementally >> in the future? >> >> >> Best, >> Wei > I'd like to see kicks happen outside the spinlock. kick with a spinlock > taken looks like a scalability issue that won't be easy to > reproduce but hurt workloads at random unexpected times. > Is that "kick inside the spinlock" the only concern you have? I think we can remove the kick actually. If we check how the host side works, it is worthwhile to let the host poll the virtqueue after it receives the cmd id from the guest (kick for cmd id isn't within the lock). Best, Wei