Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-12-06 Thread Michal Hocko
On Tue 05-12-17 15:56:18, Andrew Morton wrote: > On Tue, 5 Dec 2017 15:49:48 +0100 Michal Hocko wrote: [...] > > It also seems that there is no general agreement in the patch. Andrew, > > do you plan to keep it? > > It's in wait-and-see mode. OK, I will remove m32r from my compile test battery.

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-12-05 Thread Andrew Morton
On Tue, 5 Dec 2017 15:49:48 +0100 Michal Hocko wrote: > On Wed 29-11-17 09:17:34, Waiman Long wrote: > > The list_lru_del() function removes the given item from the LRU list. > > The operation looks simple, but it involves writing into the cachelines > > of the two neighboring list entries in ord

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-12-05 Thread Michal Hocko
On Wed 29-11-17 09:17:34, Waiman Long wrote: > The list_lru_del() function removes the given item from the LRU list. > The operation looks simple, but it involves writing into the cachelines > of the two neighboring list entries in order to get the deletion done. > That can take a while if the cach

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-12-01 Thread Dave Chinner
On Fri, Dec 01, 2017 at 09:14:52AM -0500, Waiman Long wrote: > On 11/30/2017 07:09 PM, Minchan Kim wrote: > > On Thu, Nov 30, 2017 at 12:47:36PM -0800, Andrew Morton wrote: > >> On Thu, 30 Nov 2017 08:54:04 -0500 Waiman Long wrote: > >> > And, from that perspective, the racy shortcut in the p

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-12-01 Thread Waiman Long
On 11/30/2017 07:09 PM, Minchan Kim wrote: > On Thu, Nov 30, 2017 at 12:47:36PM -0800, Andrew Morton wrote: >> On Thu, 30 Nov 2017 08:54:04 -0500 Waiman Long wrote: >> And, from that perspective, the racy shortcut in the proposed patch is wrong, too. Prefetch is fine, but in general shor

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-30 Thread Minchan Kim
On Thu, Nov 30, 2017 at 12:47:36PM -0800, Andrew Morton wrote: > On Thu, 30 Nov 2017 08:54:04 -0500 Waiman Long wrote: > > > > And, from that perspective, the racy shortcut in the proposed patch > > > is wrong, too. Prefetch is fine, but in general shortcutting list > > > empty checks outside the

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-30 Thread Minchan Kim
On Thu, Nov 30, 2017 at 08:43:41AM -0500, Waiman Long wrote: > On 11/29/2017 07:53 PM, Minchan Kim wrote: > > Hello, > > > > On Wed, Nov 29, 2017 at 09:17:34AM -0500, Waiman Long wrote: > >> The list_lru_del() function removes the given item from the LRU list. > >> The operation looks simple, but i

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-30 Thread Waiman Long
On 11/30/2017 03:38 PM, Dave Chinner wrote: > On Thu, Nov 30, 2017 at 08:54:04AM -0500, Waiman Long wrote: >> >> For the record, I add one more list_empty() check at the beginning of >> list_lru_del() in the patch for 2 purpose: >> 1. it allows the code to bail out early. > Which is what I said was

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-30 Thread Waiman Long
On 11/30/2017 03:47 PM, Andrew Morton wrote: > On Thu, 30 Nov 2017 08:54:04 -0500 Waiman Long wrote: > >>> And, from that perspective, the racy shortcut in the proposed patch >>> is wrong, too. Prefetch is fine, but in general shortcutting list >>> empty checks outside the internal lock isn't. >>

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-30 Thread Andrew Morton
On Thu, 30 Nov 2017 08:54:04 -0500 Waiman Long wrote: > > And, from that perspective, the racy shortcut in the proposed patch > > is wrong, too. Prefetch is fine, but in general shortcutting list > > empty checks outside the internal lock isn't. > > For the record, I add one more list_empty() ch

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-30 Thread Dave Chinner
On Thu, Nov 30, 2017 at 08:54:04AM -0500, Waiman Long wrote: > On 11/29/2017 07:42 PM, Dave Chinner wrote: > > On Wed, Nov 29, 2017 at 01:53:19PM -0800, Andrew Morton wrote: > >> On Wed, 29 Nov 2017 09:17:34 -0500 Waiman Long wrote: > >> > >>> The list_lru_del() function removes the given item fro

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-30 Thread Matthew Wilcox
On Wed, Nov 29, 2017 at 09:17:34AM -0500, Waiman Long wrote: > The list_lru_del() function removes the given item from the LRU list. > The operation looks simple, but it involves writing into the cachelines > of the two neighboring list entries in order to get the deletion done. > That can take a w

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-30 Thread Waiman Long
On 11/29/2017 07:42 PM, Dave Chinner wrote: > On Wed, Nov 29, 2017 at 01:53:19PM -0800, Andrew Morton wrote: >> On Wed, 29 Nov 2017 09:17:34 -0500 Waiman Long wrote: >> >>> The list_lru_del() function removes the given item from the LRU list. >>> The operation looks simple, but it involves writing

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-30 Thread Waiman Long
On 11/29/2017 07:53 PM, Minchan Kim wrote: > Hello, > > On Wed, Nov 29, 2017 at 09:17:34AM -0500, Waiman Long wrote: >> The list_lru_del() function removes the given item from the LRU list. >> The operation looks simple, but it involves writing into the cachelines >> of the two neighboring list ent

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-29 Thread Minchan Kim
Hello, On Wed, Nov 29, 2017 at 09:17:34AM -0500, Waiman Long wrote: > The list_lru_del() function removes the given item from the LRU list. > The operation looks simple, but it involves writing into the cachelines > of the two neighboring list entries in order to get the deletion done. > That can

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-29 Thread Dave Chinner
On Wed, Nov 29, 2017 at 01:53:19PM -0800, Andrew Morton wrote: > On Wed, 29 Nov 2017 09:17:34 -0500 Waiman Long wrote: > > > The list_lru_del() function removes the given item from the LRU list. > > The operation looks simple, but it involves writing into the cachelines > > of the two neighboring

Re: [PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-29 Thread Andrew Morton
On Wed, 29 Nov 2017 09:17:34 -0500 Waiman Long wrote: > The list_lru_del() function removes the given item from the LRU list. > The operation looks simple, but it involves writing into the cachelines > of the two neighboring list entries in order to get the deletion done. > That can take a while

[PATCH] list_lru: Prefetch neighboring list entries before acquiring lock

2017-11-29 Thread Waiman Long
The list_lru_del() function removes the given item from the LRU list. The operation looks simple, but it involves writing into the cachelines of the two neighboring list entries in order to get the deletion done. That can take a while if the cachelines aren't there yet, thus prolonging the lock hol