On 10/5/20 8:03 PM, Martin KaFai Lau wrote:
On Mon, Oct 05, 2020 at 09:58:38AM -0700, Song Liu wrote:
[...]
non-NMI pop(): use _lock(); check per cpu lists first;
if all per cpu lists are empty, check extralist;
if extralist is empty, return NULL.
non-NMI push(): use _lock(); only push to per cpu lists.
NMI pop(): use _trylock(); check per cpu lists first;
if all per cpu lists are locked or empty, check extralist;
if extralist is locked or empty, return NULL.
NMI push(): use _trylock(); check per cpu lists first;
if all per cpu lists are locked; try push to extralist;
if extralist is also locked, keep trying on per cpu lists.
Reported-by: Alexei Starovoitov <ast@xxxxxxxxxx>
Signed-off-by: Song Liu <songliubraving@xxxxxx>
---
Changes v1 => v2:
1. Update commit log. (Daniel)
Acked-by: Martin KaFai Lau <kafai@xxxxxx>
LGTM, applied, thanks!