Re: [PATCH 08/12] netvm: Allow skb allocation to use PFMEMALLOCreserves

From: David Miller
Date: Thu Apr 14 2011 - 17:34:17 EST


From: Mel Gorman <mgorman@xxxxxxx>
Date: Thu, 14 Apr 2011 11:41:34 +0100

> +extern int memalloc_socks;
> +static inline int sk_memalloc_socks(void)
> +{
> + return memalloc_socks;
> +}
> +
...
> +static DEFINE_MUTEX(memalloc_socks_lock);
> +int memalloc_socks __read_mostly;

Please use an atomic_t, it has to be more efficient than this mutex
business.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/