From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 8A17F1B185 for ; Wed, 5 Dec 2018 11:36:40 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 05 Dec 2018 02:36:39 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,317,1539673200"; d="scan'208";a="98227287" Received: from aburakov-mobl1.ger.corp.intel.com (HELO [10.237.220.109]) ([10.237.220.109]) by orsmga006.jf.intel.com with ESMTP; 05 Dec 2018 02:36:38 -0800 To: Seth Howell Cc: dev@dpdk.org, Darek Stojaczyk References: <20181204170610.250124-1-seth.howell@intel.com> From: "Burakov, Anatoly" Message-ID: Date: Wed, 5 Dec 2018 10:36:37 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.2 MIME-Version: 1.0 In-Reply-To: <20181204170610.250124-1-seth.howell@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH] malloc: notify primary process about hotplug in secondary X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Dec 2018 10:36:41 -0000 On 04-Dec-18 5:06 PM, Seth Howell wrote: > When secondary process hotplugs memory, it sends a request > to primary, which then performs the real mmap() and sends > sync requests to all secondary processes. Upon receiving > such sync request, each secondary process will notify the > upper layers of hotplugged memory (and will call all > locally registered event callbacks). > > In the end we'll end up with memory event callbacks fired > in all the processes except the primary, which is a bug. > > This gets critical if memory is hotplugged while a VFIO > device is attached, as the VFIO memory registration - > which is done from a memory event callback present in the > primary process only - is never called. > > After this patch, a primary process fires memory event > callbacks before secondary processes start their > synchronizations - both for hotplug and hotremove. > > Change-Id: I60de33913f58bc2454069c3844826c92cb043fff This is internal tag, please don't include it in the patch. Also, misses Fixes: tag, and Cc: stable@dpdk.org (since this bug goes back to 18.05). > Signed-off-by: Seth Howell > Signed-off-by: Darek Stojaczyk > --- Otherwise, Reviewed-by: Anatoly Burakov -- Thanks, Anatoly