Subject: Re: [PATCH net-next 1/9] net: devlink: remove region snapshot ID tracking dependency on devlink->lock

From: Jiri Pirko <[email-masked]>
Date: Thu, 28 Jul 2022 11:21:17 +0200

Thu, Jul 28, 2022 at 10:46:29AM CEST, [email-masked] wrote:
>Thu, Jul 28, 2022 at 03:58:51AM CEST, [email-masked] wrote:
>>On Wed, 27 Jul 2022 20:03:28 +0300 Moshe Shemesh wrote:
>>> So resolve this by removing dependency on devlink->lock for region
>>> snapshot ID tracking by using internal xa_lock() to maintain
>>> shapshot_ids xa_array consistency.
>>
>>xa_lock() is a spin lock, right?  s/GFP_KERNEL/GFP_ATOMIC/
>
>Correct, will fix.

Well, from how I read __xa_store(), it should be ok to have GFP_KERNEL
here, but I don't think it has any benefit over GFP_ATOMIC in this
usecase, so I will change it to GFP_ATOMIC.