Subject: Re: [patch net-next 1/4] net: Introduce psample, a new genetlink channel for packet sampling

From: Jiri Pirko <[email-masked]>
Date: Tue, 24 Jan 2017 07:48:05 +0100

Tue, Jan 24, 2017 at 12:57:50AM CET, [email-masked] wrote:
>On Sun, 22 Jan 2017 12:44:44 +0100
>Jiri Pirko <[email-masked]> wrote:
>
>> +static LIST_HEAD(psample_groups_list);
>> +static DEFINE_SPINLOCK(psample_groups_lock);
>> +
>
>Why not a mutex? You aren't acquiring this in IRQ context?

Well, that is not argument for mutex. Mutex is much heavier and does not
need to be used when not necessary (like if you don't need to sleep).