Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1234756ybv; Thu, 13 Feb 2020 18:48:54 -0800 (PST) X-Google-Smtp-Source: APXvYqyc9AfFscRqBxe4QCXbY8iIwqJOsB1TjFpDVA6JtzOp6ADAKcryppU/tsweufIGj/040u9a X-Received: by 2002:aca:4309:: with SMTP id q9mr472435oia.158.1581648534210; Thu, 13 Feb 2020 18:48:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581648534; cv=none; d=google.com; s=arc-20160816; b=dproUBunt/q2wO2v100vKmaDs9L6DKi73f1qB5bVTPi0nRHu3xVjP6s0ZhnUc9t+Xm 851S46umBmRfbgPZVtJwZeLrv4S6DhAqJah0ptmXC5usCRpm79rq0mSsWuyml9C4r1YG kIvvBJ7PVkF7TBSMw7251Sd+VOelBdt45HX9gfPZEewPFOXQMpZYSrtdk/4MTZIZuphk fIoiHxPixyXnMGUAfMzS5grGU789XRTL4wHMnJXVjH7mkKm/UO78w+9nbDpkaTifgca6 9nY+BymE/xFI5x3nFOi3sMOAIx92IP1DAEFGND4vEx9O/E/HfMp4UtWnAxhPuW5myyaH /vDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=CDEVyx0EpwrdhZ53S3lCYBJJBVy7OyGqLxfZ7Kx/RTo=; b=ieAR8Uy4l8R42g0w+eWFPxtvQlwrengn29eqcKidsCkN9irYaPSjj/kwaNnCCZ0OZ6 xIiATWBhqvqz4DhjxoopeUVcKCmu/eI9Vigy9FxN1IsG/qjMuPg9LrLtCHhvnIttigO/ JQzJWdPSdmlKhdUhKQKoY5W6b45AF9Rt5XvvUOmU/SFJNQ0AlybfcUBIwbf9iPi8ufBS ATzEgJjsGAfk4Kc/2WejcHN3PRtI7YAQPdyKFKBTUyjRgOxa6R3isIUtle1wqlrs52tg NfSHUsYsJvRC0NkoPWhTzrUvk7sr84wMHiE/mQKZ0wkXepXo9juLHXtw6VjtIJuWqXhc mgvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hTGxYK94; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w18si2173011otp.48.2020.02.13.18.48.41; Thu, 13 Feb 2020 18:48:54 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=hTGxYK94; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728141AbgBNCsR (ORCPT + 99 others); Thu, 13 Feb 2020 21:48:17 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:41686 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727604AbgBNCsR (ORCPT ); Thu, 13 Feb 2020 21:48:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=CDEVyx0EpwrdhZ53S3lCYBJJBVy7OyGqLxfZ7Kx/RTo=; b=hTGxYK94ShBJQRo8gp9VnBJSfS yc7z5VtbWZZhtoARfqUkG/EoqtsJkvl2HNEbdTp1Gbj8nITrYEXx5SgWVIxmCcedxrpiMC3l7YVU5 jwOJIPz6vR9SGuzXt8Zh9bR68n9Aa0mEqteTkms86sqSoddisLrghFvLb/+7qcA9TAcyJIjUvObB0 qhaugPYanhC8xlaDCrHgEfwC6zs9jez8hOfcQols5WAkfkOBr7uX9MaErkWe/x+xO7RfhJ5iOYu8W MTEhDucjDI0G6xLKhKj9vSy/DBSBAuhJhVj1ugkDB9hQvAz3ng+0qRii1/nP5F3uIcinW90ovbRT4 tXm4Isog==; Received: from willy by bombadil.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1j2R1S-0006CZ-3C; Fri, 14 Feb 2020 02:48:06 +0000 Date: Thu, 13 Feb 2020 18:48:06 -0800 From: Matthew Wilcox To: Wei Yang Cc: Mel Gorman , akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, shakeelb@google.com, yang.shi@linux.alibaba.com Subject: Re: [RFC Patch] mm/vmscan.c: not inherit classzone_idx from previous reclaim Message-ID: <20200214024806.GU7778@bombadil.infradead.org> References: <20200209074145.31389-1-richardw.yang@linux.intel.com> <20200211104223.GL3466@techsingularity.net> <20200212022554.GA7855@richard> <20200212074333.GM3466@techsingularity.net> <20200214020515.GC20833@richard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200214020515.GC20833@richard> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 14, 2020 at 10:05:15AM +0800, Wei Yang wrote: > On Wed, Feb 12, 2020 at 07:43:33AM +0000, Mel Gorman wrote: > >Broadly speaking it was driven by cases whereby kswapd either a) fell > >asleep prematurely and there were many stalls in direct reclaim before > >kswapd recovered, b) stalls in direct reclaim immediately after kswapd went > >to sleep or c) kswapd reclaimed for lower zones and went to sleep while > >parallel tasks were direct reclaiming in higher zones or higher orders. > > Thanks for your explanation. I am trying to understand the connection between > those cases and the behavior of kswapd. > > In summary, all three cases are related to direct reclaim, while happens in > three different timing of kswapd: Reclaim performed by kswapd is the opposite of direct reclaim. Direct reclaim is reclaim initiated by a task which is trying to allocate memory. If a task cannot perform direct reclaim itself, it may ask kswapd to attempt to reclaim memory for it.