From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF639C33CB3 for ; Tue, 28 Jan 2020 08:22:47 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 80C252173E for ; Tue, 28 Jan 2020 08:22:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 80C252173E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 29C426B0008; Tue, 28 Jan 2020 03:22:47 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 24C8B6B000A; Tue, 28 Jan 2020 03:22:47 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 161FC6B000D; Tue, 28 Jan 2020 03:22:47 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0036.hostedemail.com [216.40.44.36]) by kanga.kvack.org (Postfix) with ESMTP id 012BB6B0008 for ; Tue, 28 Jan 2020 03:22:46 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id AB823247A for ; Tue, 28 Jan 2020 08:22:46 +0000 (UTC) X-FDA: 76426351932.07.head00_6f8145e9a4c40 X-HE-Tag: head00_6f8145e9a4c40 X-Filterd-Recvd-Size: 4561 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by imf09.hostedemail.com (Postfix) with ESMTP for ; Tue, 28 Jan 2020 08:22:46 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id z7so14874856wrl.13 for ; Tue, 28 Jan 2020 00:22:46 -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=nXDl2/Asnx+mICo1O3D2WuzV1151WkKx4NKIvu/y1N0=; b=E5Y9rnBpnlqwqXdjJbt4AMrZiQsZx1jY2zrYQy5BTs2Kw5WZ16KhKKVAOlqO77ynko qB0arJCw61Ve34DpdkzPcAF+MUSr25DhwtnC00tjYO/0PItSNMRUtuXiRDbU3lHtHtME BwIl0j1uu8bKOOQ93b4pOYHhW5Qzud5kLpnoxR8GEhTefSEyeqrlIR/tEAeopRjWzsgf f+LDptnbaOwB3NGTrW4oqgS6ehz4drvNesaASQWWqVfU6ouW0kvXne8PbaTjEmd73/61 VU1dTfuK/baCA6wGpzN5xaSmwP28VBVIFjOE5yJ1/Ssj1zpwO2Q0tuTdfp3iKCGangr+ EZWA== X-Gm-Message-State: APjAAAXX7O5EAmakzyLUIZsXY0H/hC6CFEy3eNt8tOM9g/OFr7DNhE5t 2SgiHsm8RERWMPXUvBlxusk= X-Google-Smtp-Source: APXvYqz7RYQHrUxIUHM3XwD+z0O1dvbvppVqMhwZB2G00KVhSEaienFUbeuchGv/mRn+OrUz+1lSYQ== X-Received: by 2002:adf:dd8a:: with SMTP id x10mr28344090wrl.117.1580199765022; Tue, 28 Jan 2020 00:22:45 -0800 (PST) Received: from localhost (37-48-13-185.nat.epc.tmcz.cz. [37.48.13.185]) by smtp.gmail.com with ESMTPSA id i10sm25066813wru.16.2020.01.28.00.22.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Jan 2020 00:22:44 -0800 (PST) Date: Tue, 28 Jan 2020 09:22:43 +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: <20200128082243.GB18145@dhcp22.suse.cz> References: <20200109225646.22983-1-xiyou.wangcong@gmail.com> <20200110073822.GC29802@dhcp22.suse.cz> <20200121090048.GG29276@dhcp22.suse.cz> <20200127144931.GM1183@dhcp22.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon 27-01-20 16:46:16, Cong Wang wrote: > On Mon, Jan 27, 2020 at 6:49 AM Michal Hocko wrote: > > > > 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. > > I reviewed the tracing output with my eyes, they all took little time. > But of course I can't review all of them given the size is huge. Sure, I would simply use a script to check for exessive reclaims rounds. Also it is important to find out whether the page of your interest is locked outside of the reclaim or inside. -- Michal Hocko SUSE Labs