Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965668Ab2JYNrh (ORCPT ); Thu, 25 Oct 2012 09:47:37 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:52038 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935671Ab2JYNrf (ORCPT ); Thu, 25 Oct 2012 09:47:35 -0400 From: Arnd Bergmann To: Thomas Petazzoni Subject: Re: [PATCH 1/2] arm: mvebu: increase atomic coherent pool size for armada 370/XP Date: Thu, 25 Oct 2012 13:46:41 +0000 User-Agent: KMail/1.12.2 (Linux/3.5.0; KDE/4.3.2; x86_64; ; ) Cc: Gregory CLEMENT , Jason Cooper , Andrew Lunn , linux-arm-kernel@lists.infradead.org, Olof Johansson , Ben Dooks , Ian Molton , Nicolas Pitre , Lior Amsalem , Maen Suleiman , Tawfik Bayouk , Shadi Ammouri , "Eran Ben-Avi" , Yehuda Yitschak , Nadav Haklai , Ike Pan , Jani Monoses , Chris Van Hoof , Dan Frazier , Leif Lindholm , Jon Masters , David Marlin , Sebastian Hesselbarth , linux-kernel@vger.kernel.org, Marek Szyprowski References: <1351086561-13569-1-git-send-email-gregory.clement@free-electrons.com> <201210251127.36960.arnd@arndb.de> <20121025134352.16a8ef81@skate> In-Reply-To: <20121025134352.16a8ef81@skate> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201210251346.41596.arnd@arndb.de> X-Provags-ID: V02:K0:s56hGXD726yj68GJS1csfIjynH66JpU7iBcYKJEpyJ0 vwQVjWpoVgbycML6kMsmiaYKs8WIUic8OaqBWxUr429d1rUWE5 IvZ4zbCKNSPUv1dfAvAQS5frWhCm7oOSSEy1zhT/yzJthA9ygb 7C53sehRPGBoXQ1Y7L+aHa7Eqjlpp48eDebOgD8h754m/oIv+e 5o8LcVq+ZFG4d08YVOfeEd1mXaWYEdVXj+FABEbhKjC9xoGbK4 sAPSDt7JS0DdIqOYyg7VQKWfWuVTtciEtKckZgVHc88sI7UBlC PhqjqUpJQJqR46DwiIvdSKUylhpWj3zvChi0X3V82CdwZZKDf+ lUvydpz09gpend1peCDk= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1809 Lines: 39 On Thursday 25 October 2012, Thomas Petazzoni wrote: > On Thu, 25 Oct 2012 11:27:36 +0000, Arnd Bergmann wrote: > > On Wednesday 24 October 2012, Gregory CLEMENT wrote: > > > For Armada 370/XP we have the same problem that for the commit > > > cb01b63, so we applied the same solution: "The default 256 KiB > > > coherent pool may be too small for some of the Kirkwood devices, so > > > increase it to make sure that devices will be able to allocate their > > > buffers with GFP_ATOMIC flag" > > > > > > Signed-off-by: Gregory CLEMENT > > > > Do you know why the ATA driver needs this? I find it surprising that > > it's necessary, so I'd like to make sure we're not just working around > > a device driver bug here. > > The sata_mv driver create dma_pool and allocate objects from them, and > all the memory allocated for dma_pools is allocated using > dma_alloc_coherent(), and I guess the driver is using too much of them. > > Seems like the driver is too lazy and allocates everything coherent to > avoid the hassle of doing dma_map/dma_unmap operations when needed, but > I haven't looked in details at the driver yet to see if it would be > possible to switch those DMA coherent allocations into non-coherent > allocations + appropriate calls to the DMA operations. Using coherent allocations is fine, I was wondering whether they need to be atomic or not. > That said, that's for sure a larger task than just enabling SATA on > Armada 370/XP, so I would advocate to handle this problem separately. Agreed. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/