> -----Original Message----- > From: Steven Lariau <[email protected]> > Sent: Friday, September 11, 2020 10:30 AM > To: Eads, Gage <[email protected]>; Olivier Matz <[email protected]> > Cc: [email protected]; [email protected]; [email protected]; Steven Lariau > <[email protected]> > Subject: [PATCH 3/5] lib/stack: remove redundant orderings for list->len > > The load-acquire of list->len on pop function is redundant. > Only the CAS success needs to be load-acquire. > It synchronizes with the store release in push, to ensure that the > updated head is visible when the new length is visible. > Without this, one thread in pop could see the increased length but the > old list, which doesn't have enough items yet for pop to succeed. > > Signed-off-by: Steven Lariau <[email protected]> > Reviewed-by: Dharmik Thakkar <[email protected]> > Reviewed-by: Ruifeng Wang <[email protected]> Acked-by: Gage Eads <[email protected]> Thanks, Gage

