Received: by 10.192.165.148 with SMTP id m20csp217153imm; Thu, 26 Apr 2018 19:52:39 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpKZOfqHXj34ib4CoQBU0tVbujBrRKqy9CxvG9JMH8gblNgxM3qOU/ib/F+dHqs7PB8PE31 X-Received: by 2002:a65:5c01:: with SMTP id u1-v6mr529740pgr.333.1524797559316; Thu, 26 Apr 2018 19:52:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524797559; cv=none; d=google.com; s=arc-20160816; b=UIw4iOyWQwXFmjjy22OB6gdy5U6iQdCVdbGVSZbaJx4fLLRKXLyRGOvHyh7zR3HERi QvkKpNZlBa5sexBvCuRNR6WtwBM5NYmkm+GWkKy1dchXsq3sRDu4YxtPtwx+9IJ3fz59 swarVdayEHSNdgOhFFMPNgUtLeNAPJVvr+tkNlRh+Hi7Fx4L6UfA9KDa+IkOOYvlaJuo zVBzbUSy8P7XdoZijGOqEhhTohWn/EvrjJVwNmClX0YBKZPrODO+ZlTRwcloBjSelJP2 1bkgccUD/AKW9GFoxhvzEliOKUIJFVOxXSieuKWJrmxmlnUcnvTyRAbY5GUqQgs7Yt3A fV5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:spamdiagnosticmetadata :spamdiagnosticoutput:content-language:content-transfer-encoding :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature:arc-authentication-results; bh=o0xz1bvXhvZaXB94zIbsO52z0lRmEM0+Wpc/WJhf2x0=; b=OyQhV/Yl6smL/BuxdZTwVcXOg6EtU3DnrDwQXuHZhK4tCwO1Qp6jFrYP1mhmILhScE u3NQMVu8ULI5rnfEhaMoryT+b9S39ka4j58RIn8+CUcPlxbdozGbCpvB2PMNImsMpjJB yG3lq15cCa2VQxy31KoEBuVSgfBpuTWMJ+X/nwrsnw9o3C59DXsVs3JS/pTjX7fzTo53 Ns+isn/NeKGwGsp4ZYyHYoIK3YjeSAOmnaSGVWGvHg41K8+vjE85rkkaw0Hq8y/3TJS9 XrS43ZV9b9tAnw0a1IXDg6Ycgm6A/TsC5VQM55ZTpqXrFHD5RgMe/M+lOLb2G44VTvWz kKiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=B3D/SHJl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d23-v6si301703pgv.512.2018.04.26.19.52.24; Thu, 26 Apr 2018 19:52:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector1-amd-com header.b=B3D/SHJl; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757317AbeD0CvR (ORCPT + 99 others); Thu, 26 Apr 2018 22:51:17 -0400 Received: from mail-co1nam03on0066.outbound.protection.outlook.com ([104.47.40.66]:16672 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1757128AbeD0CvP (ORCPT ); Thu, 26 Apr 2018 22:51:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=o0xz1bvXhvZaXB94zIbsO52z0lRmEM0+Wpc/WJhf2x0=; b=B3D/SHJlD2HXkcwsjd6Tu0QXXVXPrPRqXI7Bmh8v5b/nt5NUiv8YLbVtE9qlzWYZDo2n+Q8NXuGMdBtfEbtkWw4UnH6qqEJ25TyFeuv5HJKt0Wt1k3nf2XKyE4xKuLNi6Oko9WGt9Wn/9xmSM4IemIhc6NO+cf8GQqvQzLTSMik= Received: from DM5PR12CA0071.namprd12.prod.outlook.com (2603:10b6:3:103::33) by CY1PR12MB0757.namprd12.prod.outlook.com (2a01:111:e400:59d1::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.696.15; Fri, 27 Apr 2018 02:51:13 +0000 Received: from BY2NAM03FT039.eop-NAM03.prod.protection.outlook.com (2a01:111:f400:7e4a::209) by DM5PR12CA0071.outlook.office365.com (2603:10b6:3:103::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.715.18 via Frontend Transport; Fri, 27 Apr 2018 02:51:13 +0000 Authentication-Results: spf=none (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; lists.freedesktop.org; dkim=none (message not signed) header.d=none;lists.freedesktop.org; dmarc=permerror action=none header.from=amd.com; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) Received: from SATLEXCHOV01.amd.com (165.204.84.17) by BY2NAM03FT039.mail.protection.outlook.com (10.152.85.205) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.20.696.11 via Frontend Transport; Fri, 27 Apr 2018 02:51:13 +0000 Received: from [10.237.74.158] (10.34.1.3) by SATLEXCHOV01.amd.com (10.181.40.71) with Microsoft SMTP Server (TLS) id 14.3.382.0; Thu, 26 Apr 2018 21:51:11 -0500 Subject: Re: [PATCH 1/2] drm/ttm: Add TTM_PAGE_FLAG_TRANSHUGE To: =?UTF-8?Q?Michel_D=c3=a4nzer?= , =?UTF-8?Q?Christian_K=c3=b6nig?= , Roger He CC: , , References: <20180426150618.13470-1-michel@daenzer.net> From: zhoucm1 Message-ID: Date: Fri, 27 Apr 2018 10:51:05 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180426150618.13470-1-michel@daenzer.net> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [10.34.1.3] X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:165.204.84.17;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(39860400002)(376002)(346002)(39380400002)(396003)(2980300002)(428003)(189003)(199004)(106466001)(16576012)(229853002)(50466002)(36756003)(104016004)(105586002)(6636002)(65956001)(6666003)(65826007)(305945005)(7736002)(5660300001)(65806001)(64126003)(446003)(8936002)(356003)(68736007)(2906002)(316002)(2870700001)(47776003)(8676002)(81156014)(11346002)(81166006)(336012)(2616005)(426003)(486006)(476003)(186003)(77096007)(23676004)(54906003)(16526019)(67846002)(6246003)(76176011)(26005)(126002)(58126008)(2486003)(478600001)(53936002)(4326008)(72206003)(86152003)(6116002)(3846002)(110136005)(575784001)(97736004)(31696002)(31686004);DIR:OUT;SFP:1101;SCL:1;SRVR:CY1PR12MB0757;H:SATLEXCHOV01.amd.com;FPR:;SPF:None;LANG:en;PTR:InfoDomainNonexistent;MX:1;A:1; X-Microsoft-Exchange-Diagnostics: 1;BY2NAM03FT039;1:q9BxKnVHsYAU24WRT1IlquIym66VrVckKVmfGtFNEjNxfT4r2f+92KkdyuB7ea/ZoU9wH44xif60CZa2V0QeVsCD+RJNHO0ZBbAwrC2VoFPnDgKLCT9fD9op1Luhw3NQ X-MS-PublicTrafficType: Email X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(5600026)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7153060)(7193020);SRVR:CY1PR12MB0757; X-Microsoft-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6E/sN0+NeOG4hbzn4l4v12W1KY97+27JpmVvLZKrF0fC6vXXdZjVRp4E8jU0Eq3JbaMYLCp0EpEIpv+OJZbON8mEf8mLqKVYJmYEpEd+Me1ttpiAtMkj+7dOo4zBalY2f2OFbeywXmsppa+aJSZNbPnogTNGkIG8eJqASLx3v7BIGtU6rcbt9TCP3sUEwT3rkRbiCqaayaIzMvkOyn0gU0fcgvtDnCV9Tae76w0AvruD4UzDCmB+BffGqSnmp50Kxnq/I21a0aPEPQycSYPEWdvNCFGzyplZ3K0TWhIfJ+2uY61h0LU703nku+BNpb/e5vnTVGN8W5AyPiKlYqdaYRNYFCi2tKinZDFqqi5PAlUafNrCfQhdqZiz3aRzgm62Cc+C5F89CRK8OTWzoQw+tYAYuZ/k7dnLSeuOHcvR+Mm3bm/ceKmN3xoQogTeFC2HibH4HECDryO06q2UHxzZc499uRwpOV X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(9452136761055)(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(10201501046)(3002001)(3231232)(944501410)(52105095)(93006095)(93003095)(6055026)(6041310)(20161123560045)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011);SRVR:CY1PR12MB0757;BCL:0;PCL:0;RULEID:;SRVR:CY1PR12MB0757; X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0757;4:rUZztWGPKHOdSQb4UtbJnaXnQTdQwserBF0cLdbFb4KxUsjSF2vQX7azPShEHT58qnukZu0dLTJkhmCvsLzIAWdp2NylSQZrPAdplvDKdFLuUZtZllDdR7Bk64lEHYN27Swdk8IX2u+9D9wFampbT12Fu6KK+53GLL6Ow6vrpnOkO9x0s4EMa+wL/3ui/EQMsd2kymfsvY9ZzLt2NUTrwtD+jXGsV4s8F0kJ0gXnHWoZShb/huZjjec3dUfZZhyWg5s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PMVHWMks/koWHSqSbuT1ooWd8DDyfMB/g/A==;5:UyCQDYF+Lg1huVsWQJl9NRcwpsHtq3caH/4y9xjmOOSiZLWa8wXkLbxeDDXF+3cNA4R4XaoNOLSXKlGPe8FFgH3Se4GXgzzjpiROkEN5quo3LUUgOjOk0xGtBjYfk+2QNt/9WNWZwJ1aFVL5u39B+W31tJPeJ3mIDzRtJ7XJ158=;24:0Aen0+BGbyTl8bCokjDO05dlfLovPrx2sGsZXIu0E4yOGS72OjkOo/I/GDf3h3i97t3hJMR+tA7ASdjfQNYgCyhOcte9f7VmoHt1Bi5c7ns= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;CY1PR12MB0757;7:tfd17r7+URnS5GdfAKI8TsSJx2YFNyggs+ObpOTz588bkzjkGJ8yxMtB6uVmph24UdxxafBiR2x2I/FywX2vgrn4gl1F+brXsaKBTgNeLAJEfPemp5mkALJe0GY+s/qcpG3tX6FVn0RuARtVFfvA8uH2OYEu5Lt5NU2e5TpCXkaDvU0+Xc2FIwvpqAHVo8IO7rXr+Z0bjfplwWro2Y3QfzjHx1R7Cp4W/n9faFzZeXAILEmLzG12OkppNniAQq23;20:nUq00KOzjKlEcAk2ZmEEdRbm1CnSd5Grv+t8NHWSG1/XcY8GvBnVNpszb9+ZfmjlFSdU05KvOrc86umRWyNDJRutVpZgzWE99H27SjD9DKkpleUUwO/caOx4VyrdWEKDjWnFQ7LMQsZtXHEbV3frp1hf7Nsohw6Z8g/BypytFzjzfssYyLyUitA8zWg5744JE/q4YFuJlfA1fy5YAdtVTzsu1TBQtVBKNHeqoK28DCrv3Z4X2cInNuwBXGR/YaKf X-MS-Office365-Filtering-Correlation-Id: b01b2707-ecfa-457d-3780-08d5abe9bd40 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Apr 2018 02:51:13.1593 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b01b2707-ecfa-457d-3780-08d5abe9bd40 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXCHOV01.amd.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR12MB0757 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018年04月26日 23:06, Michel Dänzer wrote: > From: Michel Dänzer > > When it's set, TTM tries to allocate huge pages if possible. Do you mean original driver doesn't do this? From the code, driver always try huge pages if CONFIG_TRANSPARENT_HUGEPAGE is enabled. Regards, David Zhou > Drivers > which can take advantage of huge pages should set it. > > Drivers not setting this flag no longer incur any overhead related to > allocating or freeing huge pages. > > Cc: stable@vger.kernel.org > Signed-off-by: Michel Dänzer > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +- > drivers/gpu/drm/ttm/ttm_page_alloc.c | 14 ++++++++++---- > drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 8 +++++--- > include/drm/ttm/ttm_tt.h | 1 + > 4 files changed, 17 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > index dfd22db13fb1..e03e9e361e2a 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c > @@ -988,7 +988,7 @@ static struct ttm_tt *amdgpu_ttm_tt_create(struct ttm_buffer_object *bo, > return NULL; > } > gtt->ttm.ttm.func = &amdgpu_backend_func; > - if (ttm_sg_tt_init(>t->ttm, bo, page_flags)) { > + if (ttm_sg_tt_init(>t->ttm, bo, page_flags | TTM_PAGE_FLAG_TRANSHUGE)) { > kfree(gtt); > return NULL; > } > diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c > index f0481b7b60c5..2ce91272b111 100644 > --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c > +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c > @@ -760,7 +760,7 @@ static void ttm_put_pages(struct page **pages, unsigned npages, int flags, > { > struct ttm_page_pool *pool = ttm_get_pool(flags, false, cstate); > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > - struct ttm_page_pool *huge = ttm_get_pool(flags, true, cstate); > + struct ttm_page_pool *huge = NULL; > #endif > unsigned long irq_flags; > unsigned i; > @@ -780,7 +780,8 @@ static void ttm_put_pages(struct page **pages, unsigned npages, int flags, > } > > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > - if (!(flags & TTM_PAGE_FLAG_DMA32)) { > + if ((flags & (TTM_PAGE_FLAG_DMA32 | TTM_PAGE_FLAG_TRANSHUGE)) == > + TTM_PAGE_FLAG_TRANSHUGE) { > for (j = 0; j < HPAGE_PMD_NR; ++j) > if (p++ != pages[i + j]) > break; > @@ -805,6 +806,8 @@ static void ttm_put_pages(struct page **pages, unsigned npages, int flags, > > i = 0; > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > + if (flags & TTM_PAGE_FLAG_TRANSHUGE) > + huge = ttm_get_pool(flags, true, cstate); > if (huge) { > unsigned max_size, n2free; > > @@ -877,7 +880,7 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, > { > struct ttm_page_pool *pool = ttm_get_pool(flags, false, cstate); > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > - struct ttm_page_pool *huge = ttm_get_pool(flags, true, cstate); > + struct ttm_page_pool *huge = NULL; > #endif > struct list_head plist; > struct page *p = NULL; > @@ -906,7 +909,8 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, > > i = 0; > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > - if (!(gfp_flags & GFP_DMA32)) { > + if ((flags & (TTM_PAGE_FLAG_DMA32 | TTM_PAGE_FLAG_TRANSHUGE)) == > + TTM_PAGE_FLAG_TRANSHUGE) { > while (npages >= HPAGE_PMD_NR) { > gfp_t huge_flags = gfp_flags; > > @@ -946,6 +950,8 @@ static int ttm_get_pages(struct page **pages, unsigned npages, int flags, > count = 0; > > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > + if (flags & TTM_PAGE_FLAG_TRANSHUGE) > + huge = ttm_get_pool(flags, true, cstate); > if (huge && npages >= HPAGE_PMD_NR) { > INIT_LIST_HEAD(&plist); > ttm_page_pool_get_pages(huge, &plist, flags, cstate, > diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > index 8a25d1974385..291b04213ec5 100644 > --- a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > +++ b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c > @@ -949,7 +949,8 @@ int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev, > type = ttm_to_type(ttm->page_flags, ttm->caching_state); > > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > - if (ttm->page_flags & TTM_PAGE_FLAG_DMA32) > + if ((ttm->page_flags & (TTM_PAGE_FLAG_DMA32 | TTM_PAGE_FLAG_TRANSHUGE)) > + != TTM_PAGE_FLAG_TRANSHUGE) > goto skip_huge; > > pool = ttm_dma_find_pool(dev, type | IS_HUGE); > @@ -1035,7 +1036,7 @@ void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev) > { > struct ttm_tt *ttm = &ttm_dma->ttm; > struct ttm_mem_global *mem_glob = ttm->bdev->glob->mem_glob; > - struct dma_pool *pool; > + struct dma_pool *pool = NULL; > struct dma_page *d_page, *next; > enum pool_type type; > bool is_cached = false; > @@ -1045,7 +1046,8 @@ void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev) > type = ttm_to_type(ttm->page_flags, ttm->caching_state); > > #ifdef CONFIG_TRANSPARENT_HUGEPAGE > - pool = ttm_dma_find_pool(dev, type | IS_HUGE); > + if (ttm->page_flags & TTM_PAGE_FLAG_TRANSHUGE) > + pool = ttm_dma_find_pool(dev, type | IS_HUGE); > if (pool) { > count = 0; > list_for_each_entry_safe(d_page, next, &ttm_dma->pages_list, > diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h > index c0e928abf592..c7d2120f0362 100644 > --- a/include/drm/ttm/ttm_tt.h > +++ b/include/drm/ttm/ttm_tt.h > @@ -41,6 +41,7 @@ struct ttm_operation_ctx; > #define TTM_PAGE_FLAG_DMA32 (1 << 7) > #define TTM_PAGE_FLAG_SG (1 << 8) > #define TTM_PAGE_FLAG_NO_RETRY (1 << 9) > +#define TTM_PAGE_FLAG_TRANSHUGE (1 << 10) > > enum ttm_caching_state { > tt_uncached,