Re: [PATCH] Return best entry, if it is the first one

2016-11-11 Thread David Sterba
On Thu, Nov 10, 2016 at 09:01:46AM -0600, Goldwyn Rodrigues wrote: > The find_most_right_entry() tends to miss on the best entry if it > is the first one on the list and there are only two entries in the list. > So, we assign both prev and best to entry. > > To do this, the selection process

[PATCH] Return best entry, if it is the first one

2016-11-10 Thread Goldwyn Rodrigues
The find_most_right_entry() tends to miss on the best entry if it is the first one on the list and there are only two entries in the list. So, we assign both prev and best to entry. To do this, the selection process (rather the rejection) has to be performed earlier to skip on broken==count.