Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751533AbdG0CWk (ORCPT ); Wed, 26 Jul 2017 22:22:40 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47329 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751510AbdG0CW0 (ORCPT ); Wed, 26 Jul 2017 22:22:26 -0400 From: "Aneesh Kumar K.V" To: Michal Hocko , Luiz Capitulino , Mike Kravetz Cc: linux-mm@kvack.org, LKML Subject: Re: gigantic hugepages vs. movable zones In-Reply-To: <20170726105004.GI2981@dhcp22.suse.cz> References: <20170726105004.GI2981@dhcp22.suse.cz> Date: Thu, 27 Jul 2017 07:52:08 +0530 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-MML: disable x-cbid: 17072702-0016-0000-0000-0000025F0879 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17072702-0017-0000-0000-000006E0500F Message-Id: <87inie1uwf.fsf@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-26_13:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707270037 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 910 Lines: 22 Michal Hocko writes: > Hi, > I've just noticed that alloc_gigantic_page ignores movability of the > gigantic page and it uses any existing zone. Considering that > hugepage_migration_supported only supports 2MB and pgd level hugepages > then 1GB pages are not migratable and as such allocating them from a > movable zone will break the basic expectation of this zone. Standard > hugetlb allocations try to avoid that by using htlb_alloc_mask and I > believe we should do the same for gigantic pages as well. > > I suspect this behavior is not intentional. What do you think about the > following untested patch? I also noticed an unrelated issue with the usage of start_isolate_page_range. On error we set the migrate type to MIGRATE_MOVABLE. That may conflict with CMA pages ? Wondering whether we should check for page's pageblock migrate type in pfn_range_valid_gigantic() ? -aneesh