> -----Original Message----- > From: Jerin Jacob Kollanukkaran <[email protected]> > Sent: Monday, January 14, 2019 4:00 PM > To: Gavin Hu (Arm Technology China) <[email protected]>; > [email protected] > Cc: [email protected]; Honnappa Nagarahalli > <[email protected]>; [email protected]; nd > <[email protected]>; Joyce Kong (Arm Technology China) > <[email protected]>; [email protected] > Subject: Re: [EXT] [PATCH v1] ticketlock: ticket based to improve fairness > > On Sun, 2019-01-13 at 22:46 +0800, Gavin Hu wrote: > > ------------------------------------------------------------------- > > --- > > From: Joyce Kong <[email protected]> > > > > The spinlock implementation is unfair, some threads may take locks > > aggressively while leaving the other threads starving for long time. > > As > > shown in the following test, within same period of time, there are > > threads taking locks much more times than the others. > > > > The ticketlock gives each waiting thread a ticket and they can take > > the > > lock one by one, first come, first serviced, this avoids starvation > > for > > too long time and is more predictable. > > > > *** spinlock_autotest without this patch *** > > Core [0] count = 89 > > Core [1] count = 84 > > Core [2] count = 94 > > ... > > Core [208] count = 171 > > Core [209] count = 152 > > Core [210] count = 161 > > Core [211] count = 187 > > > > *** spinlock_autotest with this patch *** > > This comment needs to be updated as it is new API now > and we need add test case for the same. I think, > making modification to exiting spinlock test case would be fine.
Thanks for you comments, we will do it and send a v2.

