drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy

2016-12-01 Thread Michal Nazarewicz
On Thu, Dec 01 2016, Michal Hocko wrote: > I am not familiar with this code so I cannot really argue but a quick > look at rmem_cma_setup doesn't suggest any speicific placing or > anything... early_cma parses ‘cma’ command line argument which can specify where exactly the default CMA area is

drm/radeon spamming alloc_contig_range: [xxx, yyy) PFNs busy busy

2016-12-01 Thread Michal Nazarewicz
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 at dhcp22.suse

[BUG] Circular locking dependency - DRM/CMA/MM/hotplug/...

2014-03-24 Thread Michal Nazarewicz
ing against concurrency > with alloc_contig_range. > > Signed-off-by: Laura Abbott Acked-by: Michal Nazarewicz Furthermore, since CMA regions are always MAX_ORDER-page or pageblock (whichever is bigger) aligned, we could use two mutexes per CMA region: one protecting the bitmap and the other one

[BUG] Circular locking dependency - DRM/CMA/MM/hotplug/...

2014-02-18 Thread Michal Nazarewicz
> On 2014-02-12 17:33, Russell King - ARM Linux wrote: >> What if we did these changes: >> >> struct page *dma_alloc_from_contiguous(struct device *dev, int count, >> unsigned int align) >> { >> ... >> mutex_lock(&cma_mutex); >> ... >> for (

[PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-08-06 Thread Michal Nazarewicz
Tomasz Stanislawski writes: > I recommend to change the semantics for unlimited number of segments > from 'value 0' to: > > #define DMA_SEGMENTS_COUNT_UNLIMITED ((unsigned long)INT_MAX) > > Using INT_MAX will allow using safe conversions between signed and > unsigned integers. LONG_MAX seems cle

Re: [PATCH 2/2] dma-buf: add helpers for attacher dma-parms

2012-08-06 Thread Michal Nazarewicz
Tomasz Stanislawski writes: > I recommend to change the semantics for unlimited number of segments > from 'value 0' to: > > #define DMA_SEGMENTS_COUNT_UNLIMITED ((unsigned long)INT_MAX) > > Using INT_MAX will allow using safe conversions between signed and > unsigned integers. LONG_MAX seems cle

Re: [RFC PATCH 0/9] Remove useless on_each_cpu return value

2012-01-03 Thread Michal Nazarewicz
On Tue, 03 Jan 2012 15:19:04 +0100, Gilad Ben-Yossef wrote: on_each_cpu() returns as its own return value the return value of smp_call_function(). smp_call_function() in turn returns a hard coded value of zero. Some callers to on_each_cpu() waste cycles and bloat code space by checking the ret

[RFC PATCH 0/9] Remove useless on_each_cpu return value

2012-01-03 Thread Michal Nazarewicz
On Tue, 03 Jan 2012 15:19:04 +0100, Gilad Ben-Yossef wrote: > on_each_cpu() returns as its own return value the return value of > smp_call_function(). smp_call_function() in turn returns a hard > coded value of zero. > > Some callers to on_each_cpu() waste cycles and bloat code space > by checkin