Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760149AbcLAQD5 (ORCPT ); Thu, 1 Dec 2016 11:03:57 -0500 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35286 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750738AbcLAQDz (ORCPT ); Thu, 1 Dec 2016 11:03:55 -0500 From: Michal Nazarewicz To: Michal Hocko , Vlastimil Babka Cc: "Robin H. Johnson" , linux-kernel@vger.kernel.org, linux-mm@kvack.org, dri-devel@lists.freedesktop.org, Joonsoo Kim , Marek Szyprowski Subject: Re: drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy In-Reply-To: <20161201141125.GB20966@dhcp22.suse.cz> Organization: http://mina86.com/ References: <20161130092239.GD18437@dhcp22.suse.cz> <20161130132848.GG18432@dhcp22.suse.cz> <20161201071507.GC18272@dhcp22.suse.cz> <20161201072119.GD18272@dhcp22.suse.cz> <9f2aa4e4-d7d5-e24f-112e-a4b43f0a0ccc@suse.cz> <20161201141125.GB20966@dhcp22.suse.cz> User-Agent: Notmuch/0.19+53~g2e63a09 (http://notmuchmail.org) Emacs/26.0.50.2 (x86_64-unknown-linux-gnu) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAJFBMVEWbfGlUPDDHgE57V0jUupKjgIObY0PLrom9mH4dFRK4gmjPs41MxjOgAAACP0lEQVQ4T23Sv2vbQBQHcBk1xE6WyALX107VUEgmn6+ouUwpEQQ6uRjttkWP4CkBg2M0BQLBdPFZYPsyFYo7qEtKDQ7on+t7+nF2Ux8ahD587717OmNYrOvycHsZ+o2r051wHTHysAvGb8ygvgu4QWT0sCmkgZCIEnlV2X8BtyraazFGDuxhmKSQJMlwHQ7v5MHSNxmz78rfElwAa3ieVD9e+hBhjaPDDG6NgFo2f4wBMNIo5YmRtF0RyDgFjJjlMIWbnuM4x9MMfABGTlN4qgIQB4A1DEyA1BHWtfeWNUMwiVJKoqh97KrkOO+qzgluVYLvFCUKAX73nONeBr7BGMdM6Sg0kuep03VywLaIzRiVr+GAzKlpQIsAFnWAG2e6DT5WmWDiudZMIc6hYrMOmeMQK9WX0B+/RfjzL9DI7Y9/Iayn29Ci0r2i4f9gMimMSZLCDMalgQGU5hnUtqAN0OGvEmO1Wnl0C0wWSCEHnuHBqmygxdxA8oWXwbipoc1EoNR9DqOpBpOJrnr0criQab9ZT4LL+wI+K7GBQH30CrhUruilgP9DRTrhVWZCiAyILP+wiuLeCKGTD6r/nc8LOJcAwR6IBTUs+7CASw3QFZ0MdA2PI3zNziH4ZKVhXCRMBjeZ1DWMekKwDCASwExy+NQ86TaykaDAFHO4aP48y4fIcDM5yOG8GcTLbOyp8A8azjJI93JFd1EA6yN8sSxMQJWoABqniRZVykYgRXErzrdqExAoUrRb0xfRp8p2A/4XmfilTtkDZ4cAAAAASUVORK5CYII= X-Face: -TR8(rDTHy/(xl?SfWd1|3:TTgDIatE^t'vop%*gVg[kn$t{EpK(P"VQ=~T2#ysNmJKN$"yTRLB4YQs$4{[.]Fc1)*O]3+XO^oXM>Q#b^ix,O)Zbn)q[y06$`e3?C)`CwR9y5riE=fv^X@x$y?D:XO6L&x4f-}}I4=VRNwiA^t1-ZrVK^07.Pi/57c_du'& X-PGP: 50751FF4 X-PGP-FP: AC1F 5F5C D418 88F8 CC84 5858 2060 4012 5075 1FF4 X-Hashcash: 1:20:161201:vbabka@suse.cz::mEO2aCAWFmGarEdI:0000H7h X-Hashcash: 1:20:161201:dri-devel@lists.freedesktop.org::gkBg1NehXo/Oa/hz:0000000000000000000000000000000wgS X-Hashcash: 1:20:161201:linux-kernel@vger.kernel.org::/RPXHm6eD55FSF4A:0000000000000000000000000000000001m9Q X-Hashcash: 1:20:161201:robbat2@gentoo.org::vmUgE2oler0UzS3R:00000000000000000000000000000000000000000002858 X-Hashcash: 1:20:161201:linux-mm@kvack.org::yGxWC+79vMVvTw8d:000000000000000000000000000000000000000000021rF X-Hashcash: 1:20:161201:m.szyprowski@samsung.com::kUKlUJSKzYS/dBXF:00000000000000000000000000000000000002JLI X-Hashcash: 1:20:161201:js1304@gmail.com::dzH0j+8oped8BUmh:02IKL X-Hashcash: 1:20:161201:mhocko@kernel.org::T3xwio96WF9NDJ8F:0000000000000000000000000000000000000000000050x0 Date: Thu, 01 Dec 2016 17:03:52 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 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 quoted-printable to 8bit by mail.home.local id uB1G414f012936 Content-Length: 1584 Lines: 40 On Thu, Dec 01 2016, Michal Hocko wrote: > Let's also CC Marek > > On Thu 01-12-16 08:43:40, Vlastimil Babka wrote: >> On 12/01/2016 08:21 AM, Michal Hocko wrote: >> > Forgot to CC Joonsoo. The email thread starts more or less here >> > http://lkml.kernel.org/r/20161130092239.GD18437@dhcp22.suse.cz >> > >> > On Thu 01-12-16 08:15:07, Michal Hocko wrote: >> > > On Wed 30-11-16 20:19:03, Robin H. Johnson wrote: >> > > [...] >> > > > alloc_contig_range: [83f2a3, 83f2a4) PFNs busy >> > > >> > > Huh, do I get it right that the request was for a _single_ page? Why do >> > > we need CMA for that? >> >> Ugh, good point. I assumed that was just the PFNs that it failed to migrate >> away, but it seems that's indeed the whole requested range. Yeah sounds some >> part of the dma-cma chain could be smarter and attempt CMA only for e.g. >> costly orders. > > Is there any reason why the DMA api doesn't try the page allocator first > before falling back to the CMA? I simply have a hard time to see why the > CMA should be used (and fragment) for small requests size. There actually may be reasons to always go with CMA even if small regions are requested. CMA areas may be defined to map to particular physical addresses and given device may require allocations from those addresses. This may be more than just a matter of DMA address space. I cannot give you specific examples though and I might be talking nonsense. > -- > Michal Hocko > SUSE Labs -- Best regards ミハウ “????????????????86” ナザレヴイツ «If at first you don’t succeed, give up skydiving»