From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752791AbbJWIdZ (ORCPT ); Fri, 23 Oct 2015 04:33:25 -0400 Received: from mail-wi0-f180.google.com ([209.85.212.180]:35088 "EHLO mail-wi0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751559AbbJWIdT (ORCPT ); Fri, 23 Oct 2015 04:33:19 -0400 Date: Fri, 23 Oct 2015 10:33:16 +0200 From: Michal Hocko To: Tejun Heo Cc: Christoph Lameter , Tetsuo Handa , linux-mm@kvack.org, linux-kernel@vger.kernel.org, torvalds@linux-foundation.org, David Rientjes , oleg@redhat.com, kwalker@redhat.com, akpm@linux-foundation.org, hannes@cmpxchg.org, vdavydov@parallels.com, skozina@redhat.com, mgorman@suse.de, riel@redhat.com Subject: Re: [PATCH] mm,vmscan: Use accurate values for zone_reclaimable() checks Message-ID: <20151023083316.GB2410@dhcp22.suse.cz> References: <201510222037.ACH86458.OFOLFtQFOHJSVM@I-love.SAKURA.ne.jp> <20151022140944.GA30579@mtj.duckdns.org> <20151022150623.GE26854@dhcp22.suse.cz> <20151022151528.GG30579@mtj.duckdns.org> <20151022153559.GF26854@dhcp22.suse.cz> <20151022153703.GA3899@mtj.duckdns.org> <20151022154922.GG26854@dhcp22.suse.cz> <20151022184226.GA19289@mtj.duckdns.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151022184226.GA19289@mtj.duckdns.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 23-10-15 03:42:26, Tejun Heo wrote: > On Thu, Oct 22, 2015 at 05:49:22PM +0200, Michal Hocko wrote: > > I am confused. What makes rescuer to not run? Nothing seems to be > > hogging CPUs, we are just out of workers which are loopin in the > > allocator but that is preemptible context. > > It's concurrency management. Workqueue thinks that the pool is making > positive forward progress and doesn't schedule anything else for > execution while that work item is burning cpu cycles. Ohh, OK I can see wq_worker_sleeping now. I've missed your point in other email, sorry about that. But now I am wondering whether this is an intended behavior. The documentation says: WQ_MEM_RECLAIM All wq which might be used in the memory reclaim paths _MUST_ have this flag set. The wq is guaranteed to have at least one execution context regardless of memory pressure. Which doesn't seem to be true currently, right? Now I can see your patch to introduce WQ_IMMEDIATE but I am wondering which WQ_MEM_RECLAIM users could do without WQ_IMMEDIATE? I mean all current workers might be looping in the page allocator and it seems possible that WQ_MEM_RECLAIM work items might be waiting behind them so they cannot help to relieve the memory pressure. This doesn't sound right to me. Or I am completely confused and still fail to understand what is WQ_MEM_RECLAIM supposed to be used for. -- Michal Hocko SUSE Labs