Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755086AbbHFJR2 (ORCPT ); Thu, 6 Aug 2015 05:17:28 -0400 Received: from mail-bn1bon0144.outbound.protection.outlook.com ([157.56.111.144]:2048 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754526AbbHFJRZ (ORCPT ); Thu, 6 Aug 2015 05:17:25 -0400 From: Chen Bough To: Jiri Slaby , Ulf Hansson CC: "linux-mmc@vger.kernel.org" , "Linux kernel mailing list" Subject: RE: [RFC] sdhci: fix DMA leaks [was: [SHDCI] Heavy (thousands) DMA leaks] Thread-Topic: [RFC] sdhci: fix DMA leaks [was: [SHDCI] Heavy (thousands) DMA leaks] Thread-Index: AQHQz5EPYBUedJp7gE2YIrmK3qyoMZ3+lGoggAAa44CAAACf4A== Date: Thu, 6 Aug 2015 09:17:22 +0000 Message-ID: References: <55B9EF02.7040404@suse.cz> <55BF36D6.4080504@suse.cz> <55C1F919.4080002@suse.cz> <55C227B4.3030102@suse.cz> <55C323A5.6050303@suse.cz> In-Reply-To: <55C323A5.6050303@suse.cz> Accept-Language: zh-CN, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Haibo.Chen@freescale.com; x-originating-ip: [199.59.226.141] x-microsoft-exchange-diagnostics: 1;BY1PR03MB1388;5:NhgEQ09/h8KxJ/ka0pGZb8++3VWj9Q+DqbDG83Cs22wVX1F1uwuu3yeRbr+w3wQHB+aeUJZ5Z1w+7ilO+VE2kIq4JIJb1DiVcat3Pa5s8gHiOVDo8m+/fXQQv2Dg7YvMEMfaYjWBfp/7VgBBqXcGnA==;24:bc1anuVNutPv1Cq9ZAevCfy3rOO19EEd7dIR09gJf+bFqWtt7KCxEjxLy7WK00Ycakg6EYaqkAy+AZJuoTbNsP7PXkJwsQR8Mjd7L8RnKM8=;20:YYeoMT+eFAPyxJHzfzBq1alJ1NdFhYjwmWF4hKBHmI1fRkDryCfrvDpuNl8HTof+WmOJCr0Dg3WoqapwrTtkeQ== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1388; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(3002001);SRVR:BY1PR03MB1388;BCL:0;PCL:0;RULEID:;SRVR:BY1PR03MB1388; x-forefront-prvs: 06607E485E x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(6009001)(199003)(13464003)(189002)(24454002)(479174004)(377454003)(5001860100001)(102836002)(86362001)(77096005)(68736005)(97736004)(5001770100001)(33656002)(5001830100001)(5001960100002)(19580405001)(2900100001)(2950100001)(189998001)(46102003)(4001540100001)(81156007)(5002640100001)(74316001)(10400500002)(2656002)(92566002)(54356999)(76176999)(101416001)(87936001)(50986999)(19580395003)(5890100001)(66066001)(93886004)(64706001)(40100003)(62966003)(5003600100002)(77156002)(122556002)(76576001)(99286002)(106356001)(106116001)(105586002);DIR:OUT;SFP:1102;SCL:1;SRVR:BY1PR03MB1388;H:BY1PR03MB1388.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Aug 2015 09:17:22.0842 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR03MB1388 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id t769HXhP014421 Content-Length: 1306 Lines: 34 I will format a patch based on your diff file firstly. I will test this on my side, If any issue, like dma issue or performance issue, I will add some modification. Then I will send the patch for review, and you can test the patch on your platform. Best Regards Haibo Chen > -----Original Message----- > From: Jiri Slaby [mailto:jslaby@suse.cz] > Sent: Thursday, August 06, 2015 5:07 PM > To: Chen Haibo-B51421; Ulf Hansson > Cc: linux-mmc@vger.kernel.org; Linux kernel mailing list > Subject: Re: [RFC] sdhci: fix DMA leaks [was: [SHDCI] Heavy (thousands) > DMA leaks] > > On 08/06/2015, 09:42 AM, Chen Bough wrote: > > I read your attached log and patch, yes, dma memory leak will happen > > when more than one pre_request execute. The method of ++next->cookie > > is not good, your patch seems good, but I still need some time to test > > the patch, because you unmap the dma in sdhci_finish_data rather than > the sdhci_post_req. > > Hi, > > yes, this is not correct. We can perhaps differentiate according to the > COOKIE value. Should I fix it or are you going to prepare a patch based > on my RFC? > > thanks, > -- > js > suse labs ????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?