From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by kanga.kvack.org (Postfix) with ESMTP id 4725E6B0005 for ; Tue, 12 Jul 2016 09:33:19 -0400 (EDT) Received: by mail-ob0-f197.google.com with SMTP id wu1so30415872obb.0 for ; Tue, 12 Jul 2016 06:33:19 -0700 (PDT) Received: from szxga04-in.huawei.com ([58.251.152.52]) by mx.google.com with ESMTPS id y10si490375oia.230.2016.07.12.06.33.17 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jul 2016 06:33:18 -0700 (PDT) Message-ID: <5784ED97.1080807@huawei.com> Date: Tue, 12 Jul 2016 21:16:07 +0800 From: Xishi Qiu MIME-Version: 1.0 Subject: why not add __GFP_HIGHMEM directly in alloc_migrate_target()? Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Linux MM , LKML alloc_migrate_target() is called from migrate_pages(), so the page is always from user space, so why not add __GFP_HIGHMEM directly, instead of the following code. if (PageHighMem(page)) // it always return false in x86_64 gfp_mask |= __GFP_HIGHMEM; Another question, when we do migration, why should split THP first? e.g. 2M(512*4kb) should flush 512 times TLB, and 2M(2M*1) only need one. I find flush TLB takes a lot of time, especially multithreaded app. Thanks, Xishi Qiu -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753967AbcGLNdS (ORCPT ); Tue, 12 Jul 2016 09:33:18 -0400 Received: from szxga04-in.huawei.com ([58.251.152.52]:24199 "EHLO szxga04-in.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1752162AbcGLNdO (ORCPT ); Tue, 12 Jul 2016 09:33:14 -0400 Message-ID: <5784ED97.1080807@huawei.com> Date: Tue, 12 Jul 2016 21:16:07 +0800 From: Xishi Qiu User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Linux MM , LKML Subject: why not add __GFP_HIGHMEM directly in alloc_migrate_target()? Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.177.25.179] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090204.5784F191.01CF,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 6e7ff35218dae27f16400c0d83b12f93 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org alloc_migrate_target() is called from migrate_pages(), so the page is always from user space, so why not add __GFP_HIGHMEM directly, instead of the following code. if (PageHighMem(page)) // it always return false in x86_64 gfp_mask |= __GFP_HIGHMEM; Another question, when we do migration, why should split THP first? e.g. 2M(512*4kb) should flush 512 times TLB, and 2M(2M*1) only need one. I find flush TLB takes a lot of time, especially multithreaded app. Thanks, Xishi Qiu