Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp3592046ybl; Mon, 27 Jan 2020 06:51:38 -0800 (PST) X-Google-Smtp-Source: APXvYqwKfmNWLR7sBe+W2K796xur0kyB57t1s2tc4v1yg2Pskz/cxY2wVL6gkRoIPxnuvOHK8kri X-Received: by 2002:aca:2b0a:: with SMTP id i10mr7705438oik.137.1580136698606; Mon, 27 Jan 2020 06:51:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1580136698; cv=none; d=google.com; s=arc-20160816; b=kNEhQqjNDlHQBCr4/lwXEJ3jGGhGcdAGVrrynKpRGD1GKUBj3k1ljXu910y3Te40UC BHqKmlLefjkhT1/6FgEGVB7sfFMx8b2XoIfaWe1rNTYb2cYqfTGGGSECM7i2jNhCK/+6 k78Ixt+7J3RoJCTa2Y7M/MpC40FteXWVWngmh9qRzET8/mA5vWaNDdBPlxGYTdTMfiCE uy2g5y5Z3Q2m3ErWcQYKaoksgLwNT11DqLzJrzQazs14J2kFQxpDFtxyx+shiVmYlvDV /t5pKKxPGk0z1SLJPgr0XKVT1ZYYI34sQjjYYpGLGMdnBwadK8izACASMEh9FRCRS3Ss VZIg== 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; bh=KoEnCm20hXD1XW9rE/9TMYQX4pzcwOm+aqs2dDRx82U=; b=gfoZjcjltuK29iWC7+/srv3k03MgmijtUijzH/0d+iPip7LLoCPoc1CdyOTvZJbEhN NN2zxd+ybnG8kfzg1LUpTxjZ6CiRrfg7jucoxGnHH0KcX3Y/SZiBpCS2hf3RsqTAyY/3 sH0TNPTuUYkI3Jzf5ewl3MPBx/QY6G1KS8qLWlwg8auioZRDmO/vkpSh7DFI5s2zFiej 7XkP6k+njlU2lJbFbpsdhhOGv5DewwYrvbAh3BsR805UVuIV1edBEV5+jybPFf7HSdkG fnDSRMOFOxK56Vu7UNQZpzkz1mhp4cCmncymENzF5axNUavCQ4KF2MwHN4pgLDY2bh8e Voeg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w24si3218999oic.260.2020.01.27.06.51.26; Mon, 27 Jan 2020 06:51:38 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729160AbgA0Ote (ORCPT + 99 others); Mon, 27 Jan 2020 09:49:34 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40959 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726635AbgA0Otd (ORCPT ); Mon, 27 Jan 2020 09:49:33 -0500 Received: by mail-wm1-f65.google.com with SMTP id t14so7333074wmi.5 for ; Mon, 27 Jan 2020 06:49:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=KoEnCm20hXD1XW9rE/9TMYQX4pzcwOm+aqs2dDRx82U=; b=I7oMw3U6DS5FfjuRU3+Io1enQ9kcpDit5D1qF5dw6ishvKNUW7KBTWk1i0icNxEPKn cwxyq0kV+h41zmtkeqYGK9F4gwZmyi3sb7zry2h6X9/Wtcdm6it5I/O2o5CuBvpIP01k NvQcNH7HKPrcx/IGygNLzLVgwFOR63gLzXROGgiOeeAVLCpHRbohG9VZSP9AF2y5aF/l 4lOXl7dce9rIGvHi9MktzxfvXSsa9sq0+fxYWySA8TuxRwNI89YtaFluUqYoOCPcmlmO pRTx9m8fjBRFYJQA8ZlUXxdYMoZAmMY3vlB7zk6iLdP4CdkYAJvXTQFC+7g6BNtU5TTA QDpA== X-Gm-Message-State: APjAAAWWW6d7pcvmTyNWubC98jTmX21z9QiXmsuCbPY7UxbpnGwP85Z8 ITSRJckZaPwkq1/J7VWI/lw= X-Received: by 2002:a1c:2504:: with SMTP id l4mr13919704wml.134.1580136572370; Mon, 27 Jan 2020 06:49:32 -0800 (PST) Received: from localhost (prg-ext-pat.suse.com. [213.151.95.130]) by smtp.gmail.com with ESMTPSA id y20sm10509394wmj.23.2020.01.27.06.49.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jan 2020 06:49:31 -0800 (PST) Date: Mon, 27 Jan 2020 15:49:31 +0100 From: Michal Hocko To: Cong Wang Cc: LKML , Andrew Morton , linux-mm , Mel Gorman , Vlastimil Babka Subject: Re: [PATCH] mm: avoid blocking lock_page() in kcompactd Message-ID: <20200127144931.GM1183@dhcp22.suse.cz> References: <20200109225646.22983-1-xiyou.wangcong@gmail.com> <20200110073822.GC29802@dhcp22.suse.cz> <20200121090048.GG29276@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun 26-01-20 11:53:55, Cong Wang wrote: > On Tue, Jan 21, 2020 at 1:00 AM Michal Hocko wrote: > > > > On Mon 20-01-20 14:48:05, Cong Wang wrote: > > > It got stuck somewhere along the call path of mem_cgroup_try_charge(), > > > and the trace events of mm_vmscan_lru_shrink_inactive() indicates this > > > too: > > > > So it seems that you are condending on the page lock. It is really > > unexpected that the reclaim would take that long though. Please try to > > enable more vmscan tracepoints to see where the time is spent. > > Sorry for the delay. I have been trying to collect more data in one shot. > > This is a a typical round of the loop after enabling all vmscan tracepoints: > > <...>-455450 [007] .... 4048595.842992: > mm_vmscan_memcg_reclaim_begin: order=0 may_writepage=1 > gfp_flags=GFP_NOFS|__GFP_HIGHMEM|__GFP_HARDWALL|__GFP_MOVABLE > classzone_idx=4 > <...>-455450 [007] .... 4048595.843012: > mm_vmscan_memcg_reclaim_end: nr_reclaimed=0 This doesn't tell us much though. This reclaim round has taken close to no time. See timestamps. > The whole trace output is huge (33M), I can provide it on request. Focus on reclaim rounds that take a long time and see where it gets you. -- Michal Hocko SUSE Labs