Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760673Ab3GaUYo (ORCPT ); Wed, 31 Jul 2013 16:24:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:65091 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757343Ab3GaUYn (ORCPT ); Wed, 31 Jul 2013 16:24:43 -0400 Date: Wed, 31 Jul 2013 16:24:09 -0400 From: Naoya Horiguchi To: "Aneesh Kumar K.V" Cc: Andrew Morton , linux-mm@kvack.org, Mel Gorman , Hugh Dickins , KOSAKI Motohiro , Andi Kleen , Hillf Danton , Michal Hocko , Rik van Riel , Wanpeng Li , linux-kernel@vger.kernel.org, Naoya Horiguchi Message-ID: <1375302249-scfvftrh-mutt-n-horiguchi@ah.jp.nec.com> In-Reply-To: <87k3k7q4ox.fsf@linux.vnet.ibm.com> References: <1374728103-17468-1-git-send-email-n-horiguchi@ah.jp.nec.com> <1374728103-17468-9-git-send-email-n-horiguchi@ah.jp.nec.com> <87k3k7q4ox.fsf@linux.vnet.ibm.com> Subject: Re: [PATCH 8/8] prepare to remove /proc/sys/vm/hugepages_treat_as_movable Mime-Version: 1.0 Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Mutt-References: <87k3k7q4ox.fsf@linux.vnet.ibm.com> X-Mutt-Fcc: ~/Maildir/sent/ User-Agent: Mutt 1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1581 Lines: 40 On Wed, Jul 31, 2013 at 12:02:30AM +0530, Aneesh Kumar K.V wrote: > Naoya Horiguchi writes: > > > Now hugepages are definitely movable. So allocating hugepages from > > ZONE_MOVABLE is natural and we have no reason to keep this parameter. > > In order to allow userspace to prepare for the removal, let's leave > > this sysctl handler as noop for a while. > > I guess you still need to handle architectures for which pmd_huge is > > int pmd_huge(pmd_t pmd) > { > return 0; > } > > embedded powerpc is one. They don't store pte information at the PMD > level. Instead pmd contains a pointer to hugepage directory which > contain huge pte. It seems that this comment is for the whole series, not just for this patch, right? Some users of hugepage migration (mbind, move_pages, migrate_pages) walk over page tables to collect hugepages to be migrated, where hugepages are just ignored in such architectures due to pmd_huge. So no problem for these users. But the other users (softoffline, memory hotremove) choose hugepages to be migrated based on pfn, where they don't check pmd_huge. As you wrote, this can be problematic for such architectures. So I think of adding pmd_huge() check somewhere (in unmap_and_move_huge_page for example) to make it fail for such architectures. Thanks, Naoya Horiguchi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/