lkml.org 
[lkml]   [2018]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] dma-debug: Dynamically expand the dma_debug_entry pool
> +	for (retry_count = 0; ; retry_count++) {
> + spin_lock_irqsave(&free_entries_lock, flags);
> +
> + if (num_free_entries > 0)
> + break;
>
> spin_unlock_irqrestore(&free_entries_lock, flags);

Taking a spinlock just to read a single integer value doesn't really
help anything.

> +
> + if (retry_count < DMA_DEBUG_DYNAMIC_RETRIES &&
> + !prealloc_memory(DMA_DEBUG_DYNAMIC_ENTRIES))

Don't we need GFP_ATOMIC here? Also why do we need the retries?

\
 
 \ /
  Last update: 2018-12-04 15:29    [W:0.091 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site