Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1383938ybt; Thu, 25 Jun 2020 04:56:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjqJWPrgNorJH5WWC2GaJnY5GalgBQpnZC6Zd1EC6NxElXEaUjIPwxuRd5jlleAbOgj70A X-Received: by 2002:a50:9a63:: with SMTP id o90mr10508300edb.95.1593086199377; Thu, 25 Jun 2020 04:56:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593086199; cv=none; d=google.com; s=arc-20160816; b=AzQ0EmWuy//mkbwOONlK/7SzudEhgilCvW0A7vr88bjeO2GtYwHaNiCdt1wDXtComh BQtpjxzk1y0pFObp4/GQ1yd/yklwIQa+vG0oxcmaf2Pw3OC+V2tdGztp0d6GUy1gjdur ky0MuBE76VWI7xphbctvAtPRbqBMygE7CRviugel+hFiEAqCddgNytr8/zm9MPGOGTgE 8uZICS3iSnVcK/pU3gh+TaZjJTAtK3P00508bTQhXppQGLfzR9pvbpZTRJas2jCpdUjC zvTprn2bw/AQR5AIxzT03u+SYrrb8mfLqclLlPvtUUJSxKvAhVCC2zs2jc7WZe2OTR9R K2hw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=KkyD/dCsP/NUyZaxekBryRpKElEY0AMZnqKJIyE/Nxc=; b=ekbs/+Qch9EwS7rsfBeY+xYB34um+MKfMVNvQ1lFW0gTROJDeGSMmxTJT0Wup6uH9A ZTZeyWQHA5vyoDv3n4JhuhQUdHuiYCp2NK3As2iUuKX1e8wVcfdDR6WzTglvYxZlV/4O 9ypaDu6F5PruOSifFuOxR3R51UT4Uu2Eo1dOCKcoES46daUiZIsLtDi+2RpWqj7rHqZ+ zMDHK4rPHScNFEjHUVMFhAyfdhg7zIchxdxIaKxRLPBiokjPXeUWBTMnedrH7sui4fga QGHRVkolmS9oCErn1feIg5dW4cpgFICQ7wlQz+HswGeBpoSuRkLVY5SBT1Ufx6Mm5tAt rIAw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z17si13576246ejo.11.2020.06.25.04.56.16; Thu, 25 Jun 2020 04:56:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404559AbgFYLy1 (ORCPT + 99 others); Thu, 25 Jun 2020 07:54:27 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:38249 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404309AbgFYLyZ (ORCPT ); Thu, 25 Jun 2020 07:54:25 -0400 Received: by mail-wr1-f67.google.com with SMTP id z13so5538980wrw.5 for ; Thu, 25 Jun 2020 04:54:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KkyD/dCsP/NUyZaxekBryRpKElEY0AMZnqKJIyE/Nxc=; b=sUqI7NK/ZR0XRHyyzmFwa5pyDam8t01P9eP0aTCYR90//sGVE5k+cW6is5834+E8ag Eb88vcrLJdMZuVcgiEtUwMiiYfaw8DHS3IvGxsJ7lAsoiMciWOHF9A9SN8nmPp54SBY6 hanQUMuzvWdPmypuJlde4Rm8UTH90ZcLKve0EQ671jCgy/SeM2x8y9HOmK40BtktZsqK aXRZRU3MwWvYWO/unAzOvHRDeEhYcRwAikgkPevVu0O3G8v9aSdd6UK37x/KXHLa9jLK q7WiZNWETxzBhXBiAFgGJ1c8Rbbc/cwhGcaxW57epiDCErU4y8WNZfpFlL1insDXvxJw ou4g== X-Gm-Message-State: AOAM5324V2Jc1PaCVkt4ktfaekQ3xoTH07W45yWvfV/9i/Olim5I4PND 4pBEfIiA9dc779D8NwSo2lQ= X-Received: by 2002:a05:6000:111:: with SMTP id o17mr11435758wrx.178.1593086063961; Thu, 25 Jun 2020 04:54:23 -0700 (PDT) Received: from localhost (ip-37-188-168-3.eurotel.cz. [37.188.168.3]) by smtp.gmail.com with ESMTPSA id u84sm8646313wme.42.2020.06.25.04.54.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Jun 2020 04:54:23 -0700 (PDT) Date: Thu, 25 Jun 2020 13:54:22 +0200 From: Michal Hocko To: js1304@gmail.com Cc: Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@lge.com, Vlastimil Babka , Christoph Hellwig , Roman Gushchin , Mike Kravetz , Naoya Horiguchi , Joonsoo Kim Subject: Re: [PATCH v3 4/8] mm/hugetlb: make hugetlb migration callback CMA aware Message-ID: <20200625115422.GE1320@dhcp22.suse.cz> References: <1592892828-1934-1-git-send-email-iamjoonsoo.kim@lge.com> <1592892828-1934-5-git-send-email-iamjoonsoo.kim@lge.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1592892828-1934-5-git-send-email-iamjoonsoo.kim@lge.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 23-06-20 15:13:44, Joonsoo Kim wrote: > From: Joonsoo Kim > > new_non_cma_page() in gup.c which try to allocate migration target page > requires to allocate the new page that is not on the CMA area. > new_non_cma_page() implements it by removing __GFP_MOVABLE flag. This way > works well for THP page or normal page but not for hugetlb page. Could you explain why? I mean why cannot you simply remove __GFP_MOVABLE flag when calling alloc_huge_page_nodemask and check for it in dequeue path? Your current calling convention doesn't allow that but as I've said in the reply to previous patch this should be changed and then it would make this one easier as well unless I am missing something. -- Michal Hocko SUSE Labs