From patchwork Fri Feb 15 23:02:08 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felix Kuehling X-Patchwork-Id: 10816095 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3D9D61575 for ; Fri, 15 Feb 2019 23:02:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2EEBB30262 for ; Fri, 15 Feb 2019 23:02:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 22AC630266; Fri, 15 Feb 2019 23:02:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.7 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B8F1630262 for ; Fri, 15 Feb 2019 23:02:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A59626EBE2; Fri, 15 Feb 2019 23:02:11 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-eopbgr780047.outbound.protection.outlook.com [40.107.78.47]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3E5556EBDF; Fri, 15 Feb 2019 23:02:10 +0000 (UTC) Received: from DM5PR12MB1707.namprd12.prod.outlook.com (10.175.89.136) by DM5PR12MB1451.namprd12.prod.outlook.com (10.172.38.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1601.19; Fri, 15 Feb 2019 23:02:08 +0000 Received: from DM5PR12MB1707.namprd12.prod.outlook.com ([fe80::fc2b:9e80:ca29:6c95]) by DM5PR12MB1707.namprd12.prod.outlook.com ([fe80::fc2b:9e80:ca29:6c95%8]) with mapi id 15.20.1601.023; Fri, 15 Feb 2019 23:02:08 +0000 From: "Kuehling, Felix" To: "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" Subject: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems Thread-Topic: [PATCH 1/1] [RFC] drm/ttm: Don't init dma32_zone on 64-bit systems Thread-Index: AQHUxYJ6FJqrNjGUJEmYaUUp/TU22g== Date: Fri, 15 Feb 2019 23:02:08 +0000 Message-ID: <1550271712-13069-1-git-send-email-Felix.Kuehling@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [165.204.55.251] x-mailer: git-send-email 2.7.4 x-clientproxiedby: YTOPR0101CA0046.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b00:14::23) To DM5PR12MB1707.namprd12.prod.outlook.com (2603:10b6:3:10f::8) x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: c0b8ea52-b044-400f-1107-08d693999c89 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600110)(711020)(4605077)(4618075)(2017052603328)(7153060)(7193020); SRVR:DM5PR12MB1451; x-ms-traffictypediagnostic: DM5PR12MB1451: x-microsoft-exchange-diagnostics: 1; DM5PR12MB1451; 20:+U2gd899U6D5UfbO51pRw9dPdqNRByP4TgbBxmSNH52fEF+XysdApPBkKv7nYG//0fH1DOVo3/n3Ycx1SE1akec+B3pzRO/NP5gTYUUnpQh0cmxzDxf05JhceasO4PG+a/a/Y8IDQkuY4kwyD1SsfXD6lA9WubutBz7MROyEt2qyPLfbRb4n/ATbWJFUKcujmWk5Xv0a0wFKrsqMct9PozrBI4kCyEuV/VssIPQBSNiWLNBPm1xrDQfO0WHVkklx x-microsoft-antispam-prvs: x-forefront-prvs: 09497C15EB x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(376002)(346002)(366004)(136003)(39860400002)(396003)(189003)(199004)(478600001)(2501003)(50226002)(25786009)(256004)(110136005)(8936002)(2906002)(99286004)(8676002)(72206003)(68736007)(4326008)(52116002)(316002)(66066001)(7736002)(54906003)(305945005)(81166006)(6486002)(81156014)(6512007)(186003)(6436002)(26005)(71190400001)(97736004)(106356001)(476003)(105586002)(2616005)(486006)(6506007)(386003)(14454004)(36756003)(3846002)(86362001)(71200400001)(53936002)(102836004)(6116002)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR12MB1451; H:DM5PR12MB1707.namprd12.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: ynDWyslTI7KH9DSgFBf/HOrBZM0l4USTutxuZlt5oKx2kReEwX74tdCtQwXuGNGuRI55vxB1rqyV6K9UPshZMdhc1xhO13Q9isiAsdRWx39uZIr06/v36EaqvV4vZQ0kxSNHzU0iBPuV9z8THmKEkkzZVyfT7m1dr0sJ5xBZxioPPSrXFIpsEcGfpCrWri9EDxsvjeFwJ37g84wBuYiWxvmXyarCmIK0fQ0BeqBoX+E099v7xHW620q96kxzlIhwQzIo9MXt/cEyuwdxf+1LJZRo+J/WmQcEaIsiHIgUjy4ev3TS9ObTr0KyjMWM121ajy89Dkbc746UQIZa4dWGU5uNTvHKqu3qCXvZNB2HRWewg9NUO4Or1K9J6tufIDqG0lb4+ye8HiASkI0LLsP2zyeZ9OmBiS2DiYUDcJfUpVc= MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0b8ea52-b044-400f-1107-08d693999c89 X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2019 23:02:08.2919 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1451 X-Mailman-Original-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:X-MS-Exchange-SenderADCheck; bh=4nWhOylNsksFIMV4krupp4PkrX3FzdV6pHZ7rx2UbLY=; b=c9OmhsNGgRoSG995/YQ6aF0MuKEDNXoRN7M7stW5NsvZK8Tq+T2ODD9xgkK/gho370CCO/+wbSzgvjQTYuGbGd2GyPITqIsrzxeGcdRYkPDNU48pgTZf41M6vHaJym+3Z1cd56J9jIqV5wn4YNPKBJbcsH/tQ8XQZN9Ap4A+4YM= X-Mailman-Original-Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Felix.Kuehling@amd.com; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Kuehling, Felix" , "thellstrom@vmware.com" , "Koenig, Christian" Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is an RFC. I'm not sure this is the right solution, but it highlights the problem I'm trying to solve. The dma32_zone limits the acc_size of all allocated BOs to 2GB. On a 64-bit system with hundreds of GB of system memory and GPU memory, this can become a bottle neck. We're seeing TTM memory allocation failures not because we're truly out of memory, but because we're out of space in the dma32_zone for the acc_size needed for our BO book-keeping. Signed-off-by: Felix Kuehling CC: thellstrom@vmware.com CC: christian.koenig@amd.com --- drivers/gpu/drm/ttm/ttm_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c index f1567c3..bb05365 100644 --- a/drivers/gpu/drm/ttm/ttm_memory.c +++ b/drivers/gpu/drm/ttm/ttm_memory.c @@ -363,7 +363,7 @@ static int ttm_mem_init_highmem_zone(struct ttm_mem_global *glob, glob->zones[glob->num_zones++] = zone; return 0; } -#else +#elifndef CONFIG_64BIT static int ttm_mem_init_dma32_zone(struct ttm_mem_global *glob, const struct sysinfo *si) { @@ -441,7 +441,7 @@ int ttm_mem_global_init(struct ttm_mem_global *glob) ret = ttm_mem_init_highmem_zone(glob, &si); if (unlikely(ret != 0)) goto out_no_zone; -#else +#elifndef CONFIG_64BIT ret = ttm_mem_init_dma32_zone(glob, &si); if (unlikely(ret != 0)) goto out_no_zone;