From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933658AbcIUMFM (ORCPT ); Wed, 21 Sep 2016 08:05:12 -0400 Received: from mail-wm0-f66.google.com ([74.125.82.66]:33204 "EHLO mail-wm0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932641AbcIUMFL (ORCPT ); Wed, 21 Sep 2016 08:05:11 -0400 Date: Wed, 21 Sep 2016 14:05:08 +0200 From: Michal Hocko To: Dave Hansen Cc: Rui Teng , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrew Morton , Naoya Horiguchi , "Kirill A . Shutemov" , Vlastimil Babka , Mike Kravetz , "Aneesh Kumar K . V" , Paul Gortmaker , Santhosh G Subject: Re: [PATCH] memory-hotplug: Fix bad area access on dissolve_free_huge_pages() Message-ID: <20160921120507.GG10300@dhcp22.suse.cz> References: <1473755948-13215-1-git-send-email-rui.teng@linux.vnet.ibm.com> <57D83821.4090804@linux.intel.com> <57D97CAF.7080005@linux.intel.com> <566c04af-c937-cbe0-5646-2cc2c816cc3f@linux.vnet.ibm.com> <57DC1CE0.5070400@linux.intel.com> <7e642622-72ee-87f6-ceb0-890ce9c28382@linux.vnet.ibm.com> <57E14D64.6090609@linux.intel.com> <57E17531.6050008@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <57E17531.6050008@linux.intel.com> User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 20-09-16 10:43:13, Dave Hansen wrote: > On 09/20/2016 08:52 AM, Rui Teng wrote: > > On 9/20/16 10:53 PM, Dave Hansen wrote: > ... > >> That's good, but aren't we still left with a situation where we've > >> offlined and dissolved the _middle_ of a gigantic huge page while the > >> head page is still in place and online? > >> > >> That seems bad. > >> > > What about refusing to change the status for such memory block, if it > > contains a huge page which larger than itself? (function > > memory_block_action()) > > How will this be visible to users, though? That sounds like you simply > won't be able to offline memory with gigantic huge pages. I might be missing something but Is this any different from a regular failure when the memory cannot be freed? I mean /sys/devices/system/memory/memory API doesn't give you any hint whether the memory in the particular block is used and unmigrateable. -- Michal Hocko SUSE Labs