From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752591AbcHKJSV (ORCPT ); Thu, 11 Aug 2016 05:18:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:39026 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751093AbcHKJSQ (ORCPT ); Thu, 11 Aug 2016 05:18:16 -0400 From: Vitaly Kuznetsov To: "Alex Ng \(LIS\)" Cc: "devel\@linuxdriverproject.org" , "linux-kernel\@vger.kernel.org" , "Haiyang Zhang" , KY Srinivasan Subject: Re: [PATCH 3/4] Drivers: hv: balloon: get rid on ol_waitevent References: <1470394147-21268-1-git-send-email-vkuznets@redhat.com> <1470394147-21268-4-git-send-email-vkuznets@redhat.com> Date: Thu, 11 Aug 2016 11:18:13 +0200 In-Reply-To: (Alex Ng's message of "Wed, 10 Aug 2016 18:12:05 +0000") Message-ID: <87popf8y0a.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.95 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Thu, 11 Aug 2016 09:18:16 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org "Alex Ng (LIS)" writes: >> -----Original Message----- >> From: Vitaly Kuznetsov [mailto:vkuznets@redhat.com] >> Sent: Friday, August 5, 2016 3:49 AM >> To: devel@linuxdriverproject.org >> Cc: linux-kernel@vger.kernel.org; Haiyang Zhang ; KY >> Srinivasan ; Alex Ng (LIS) >> Subject: [PATCH 3/4] Drivers: hv: balloon: get rid on ol_waitevent >> >> With the recently introduced in-kernel memory onlining >> (MEMORY_HOTPLUG_DEFAULT_ONLINE) these it no point in waiting for pages >> to come online in the driver and in case the feature is disabled the 5 >> second wait won't help. Get rid of the waiting. >> > > Continuing our internal discussion here. Here's the context. > >> > Is it necessary to remove the ol_waitevent in "Drivers: hv: balloon: get rid >> > on ol_waitevent"? If we respond to the host too quickly, then the next >> > hot-add request may not see the new pages come online and could fail to >> > alloc memory as seen in the call trace. >> > >> > Thoughts? >> >> This should not be an issue with CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE: we >> online pages when we add them (add_memory()) so when we reply to the host >> these pages are already online. But in case the onlining is done by an >> external tool (e.g. udev) this wait helps (not always, as if someone eats >> all memory before the next add_memory call we're still in trouble). > > MEMORY_HOTPLUG_DEFAULT_ONLINE is disabled in Kconfig by default. > Would it make sense to keep the wait and only #ifdef it out when CONFIG_MEMORY_HOTPLUG_DEFAULT_ONLINE is set? I have a better idea. We can check 'memhp_auto_online' value to see the current status and don't wait if it is 'true'. Will do v2. -- Vitaly