From patchwork Wed Aug 16 07:25:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Liu, Monk" X-Patchwork-Id: 9903305 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id F41CC603B5 for ; Wed, 16 Aug 2017 09:00:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EB270289A3 for ; Wed, 16 Aug 2017 09:00:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFD60289A8; Wed, 16 Aug 2017 09:00:58 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, HTML_MESSAGE, RCVD_IN_DNSWL_MED, T_DKIM_INVALID 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 D15C6289AB for ; Wed, 16 Aug 2017 09:00:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 561EC6E40F; Wed, 16 Aug 2017 09:00:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 4771 seconds by postgrey-1.35 at gabe; Wed, 16 Aug 2017 09:00:43 UTC Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0054.outbound.protection.outlook.com [104.47.40.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5D1F96E40F for ; Wed, 16 Aug 2017 09:00:43 +0000 (UTC) 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=W8MQY2cqFuKzw4AwYr+7a95Gi63KQURomGinQiAU40Y=; b=nrDoRz+Zq4Omn5yGrsHElTUzDf7LPKPM3S4krhPl21Jk45EYnAwVQ+kY4+QjhUR0s1VSCzY7Ow40+ZGvjpjWwfpGXknABxxSG++n4WXOO9cdOATuPqybDboM4u+Za1ikE1YqXRuxFSnmxpvU/qzJ17uLTeKZcaDYeO34FfmISm4= Received: from BLUPR12MB0449.namprd12.prod.outlook.com (10.162.92.142) by BN3PR1201MB0929.namprd12.prod.outlook.com (10.165.76.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1341.21; Wed, 16 Aug 2017 07:25:55 +0000 Received: from BLUPR12MB0449.namprd12.prod.outlook.com ([10.162.92.142]) by BLUPR12MB0449.namprd12.prod.outlook.com ([10.162.92.142]) with mapi id 15.01.1341.020; Wed, 16 Aug 2017 07:25:54 +0000 From: "Liu, Monk" To: "Yu, Xiangliang" , "akpm@linux-foundation.org" , "labbott@redhat.com" , "dri-devel@lists.freedesktop.org" , "amd-gfx@lists.freedesktop.org" Subject: Re: [PATCH 1/1] drm/ttm: Fix accounting error when fail to get pages for pool Thread-Topic: [PATCH 1/1] drm/ttm: Fix accounting error when fail to get pages for pool Thread-Index: AQHTFmA/l0LDjhk9AESJ2GBQPAfBTKKGlPq1 Date: Wed, 16 Aug 2017 07:25:54 +0000 Message-ID: References: <1502868046-32511-1-git-send-email-Xiangliang.Yu@amd.com> In-Reply-To: <1502868046-32511-1-git-send-email-Xiangliang.Yu@amd.com> Accept-Language: en-US, zh-CN Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Monk.Liu@amd.com; x-originating-ip: [116.228.147.241] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; BN3PR1201MB0929; 20:d+EXQSK/znPgo43EViO8lIbyMHSMrO8Cm5BepMEXzeObZR5xCXpOn9vPzRzAjicYp/ei0kuss7HjQ/6bkS73cMMvwMR0bzgGHGsmUBdQh+bcOo2hpXae7A/OYa38Y5zcU9BwDx2xcXTWeQ8GUWcwRb5UQ15s1WEXClLBcZeu5cGoGeCuJpjQpjo/vuzonw5+YpIS9ntp4Q8oikPeiXJOlNVtnWxhmVFTyW1DvKEIafbG0eTbPjLSg86CAyHtixmG x-ms-exchange-antispam-srfa-diagnostics: SSOS;SSOR; x-forefront-antispam-report: SFV:SKI; SCL:-1; SFV:NSPM; SFS:(10009020)(39860400002)(199003)(189002)(377454003)(53936002)(7736002)(3280700002)(236005)(189998001)(54896002)(6306002)(68736007)(55016002)(6436002)(8936002)(8676002)(81156014)(81166006)(6246003)(2906002)(77096006)(33656002)(6506006)(966005)(2201001)(25786009)(72206003)(15650500001)(99286003)(66066001)(9686003)(229853002)(5660300001)(14454004)(2900100001)(101416001)(102836003)(6116002)(3846002)(2950100002)(7696004)(478600001)(105586002)(106356001)(97736004)(606006)(3660700001)(2501003)(50986999)(74316002)(76176999)(54356999)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR1201MB0929; H:BLUPR12MB0449.namprd12.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; x-ms-office365-filtering-correlation-id: 5e43090d-95b4-4ec6-330d-08d4e47807d3 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(48565401081)(2017052603155)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN3PR1201MB0929; x-ms-traffictypediagnostic: BN3PR1201MB0929: x-exchange-antispam-report-test: UriScan:(158342451672863)(767451399110)(217544274631240); x-microsoft-antispam-prvs: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6041248)(20161123562025)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123558100)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR1201MB0929; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR1201MB0929; x-forefront-prvs: 0401647B7F received-spf: None (protection.outlook.com: amd.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Aug 2017 07:25:54.3478 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR1201MB0929 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Monk Liu diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index eeddc1e..8715998 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -615,7 +615,7 @@ static void ttm_page_pool_fill_locked(struct ttm_page_pool *pool, } else { pr_err("Failed to fill pool (%p)\n", pool); /* If we have any pages left put them to the pool. */ - list_for_each_entry(p, &pool->list, lru) { + list_for_each_entry(p, &new_pages, lru) { ++cpages; } list_splice(&new_pages, &pool->list);