Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp331727ybg; Fri, 12 Jun 2020 02:44:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPIXKT1SXOLZ8uRIlA+/GhY7rEq53dfiWYVEmz3NtnDiTjURHBevBpfxVc0PT+/RGaSQJo X-Received: by 2002:aa7:c541:: with SMTP id s1mr10997173edr.167.1591955061639; Fri, 12 Jun 2020 02:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591955061; cv=none; d=google.com; s=arc-20160816; b=oGClz/dFziqtppd28/NdDsb4UWhqd0335Ocv/+jmpoFicKAtdqsp8lGUEv1JtRbm2p X619DP4yrSnfo7OR6FtVT8THSe+Ht//JCQXFUk+X66G2obNe6daaLvXK4BpX/vXwB2p+ nQ+YexzZ8WvdGRenfmP8oC4qe1H1p07cytWW14QPtBnW9E4utJWmMPHRU4vuc0jofWk9 KdmptMcd44fIRvto8UtMlEpcDh9Hm74qzDVeDLGSrtcZGvw4CO8ciBIEJajfXKEr/yaL QDNYw2FMS1SGJk8ho/rGeMVp4iVkzGGgtc05UCaNqjH8FAknRSnUgX+GiQw9X3faRfjy ogbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=aIjum0OdXj+v8gBuVrC8N67GclMwnVqsebwDSnxt9vM=; b=RFp0OLxsipJm4FPOiFEhG468HdCIABr1xtCofvPbZkEv9HLraRJwGSysbelQZGTKvN Bh09oZy15d5wPaINkJg7YUL/q8SiOqptMp6qPccwyj8YbE1ssCZrPMsibGWzUMoyXy7Q jOC+BeE/lCV6EIj/MCPeGd550ibdGQ1VbRS8PoNrNs3dIwbLs+QH774igk5MWSHCGsM9 Lvibcu/2Nc454BCGz+HYo1z5e7UDZevqUhmGEuoF2rYt6AzmxB3CYOzDW5lDqW4g6YnV Goo/tLnPtOfd5K7cre9egczmM1ISBb4U7lEPo6QwOCPc58uELJW72yLRGcLF5bvLt73q rswQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B5zzUnrx; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l2si3553294ejd.191.2020.06.12.02.43.48; Fri, 12 Jun 2020 02:44:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=B5zzUnrx; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726009AbgFLJni (ORCPT + 99 others); Fri, 12 Jun 2020 05:43:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725886AbgFLJnh (ORCPT ); Fri, 12 Jun 2020 05:43:37 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0EF4C08C5C2 for ; Fri, 12 Jun 2020 02:43:35 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id e4so10368336ljn.4 for ; Fri, 12 Jun 2020 02:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=aIjum0OdXj+v8gBuVrC8N67GclMwnVqsebwDSnxt9vM=; b=B5zzUnrxMZIR1cvpNNJdn3LFoosy6pPU4isLVSWgJ9nP8PUuaqb/X7mACFUtN4Zz0e je1pJ6/7L30IUd9miR1oO0pReCGX2bidQmzsxFyBH7tKSWWLqW6VQz10wJTlfMKj9rrB WBE/JK4Uw5jGqY0GBMDdgRP4v094YfQNIFITKncq2chQL2ULqFL5HZsbtycVUANMKQ4q Ff22Q8bj6f9otWxYKNEcAsUS4YOjCGydg0FG7aELVJHksT7x7qdY2jHFHD/khmaddwqh 5gNJVS3WCEasOzyYFedHV6DyZL/RyohzMUHwWpOSbVYfzQc6KihVidQjyi/EVoZE4LYe XpFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aIjum0OdXj+v8gBuVrC8N67GclMwnVqsebwDSnxt9vM=; b=Zn7YI1um0vjuAoTQh6rFYZ+krQz0/RSCtS4SWYegSiLxi5zaA5p32iMbf3KHq3aHmc QZLELyk5mV1w6pQ7r9jPWVSee3bvayavc3rIT8mVab5ZEEwKM7SnhVcLXDH0QQ+uVzR5 yB5K90yomdVFVFxffDYEwEQJ3aK68GRtWYNqUn9dRZXOssU1JCqZ9q5HUZl65nCjjTOh qlzW1kPH5+i09AKVPMX+OIuvGj4jY7xQMeUnjIq33GNq9GcIBYrbka9Qn2mVe9I6BRQL gWI/v7EgNmhKYGoh4Y5z089cI6gMCGPQyg/BBLRHM/8UYGsRzpt42flJJcqKVLzG/b2R K2ew== X-Gm-Message-State: AOAM531NMwCWOpekAlXOM6hETJcNHOWuDb8vul18pFvyKP3+leYomBcJ idewe+W0hsBFSzMtjyV4YRTVnNyTRUzl+WLpzKPbZg== X-Received: by 2002:a2e:984b:: with SMTP id e11mr6079071ljj.358.1591955014129; Fri, 12 Jun 2020 02:43:34 -0700 (PDT) MIME-Version: 1.0 References: <20200521095515.GK6462@dhcp22.suse.cz> <20200521163450.GV6462@dhcp22.suse.cz> <20200528150310.GG27484@dhcp22.suse.cz> <20200528164121.GA839178@chrisdown.name> <20200529015644.GA84588@chrisdown.name> <20200529094910.GH4406@dhcp22.suse.cz> <20200611095514.GD20450@dhcp22.suse.cz> In-Reply-To: <20200611095514.GD20450@dhcp22.suse.cz> From: Naresh Kamboju Date: Fri, 12 Jun 2020 15:13:22 +0530 Message-ID: Subject: Re: mm: mkfs.ext4 invoked oom-killer on i386 - pagecache_get_page To: Michal Hocko Cc: Chris Down , Yafang Shao , Anders Roxell , "Linux F2FS DEV, Mailing List" , linux-ext4 , linux-block , Andrew Morton , open list , Linux-Next Mailing List , linux-mm , Arnd Bergmann , Andreas Dilger , Jaegeuk Kim , "Theodore Ts'o" , Chao Yu , Hugh Dickins , Andrea Arcangeli , Matthew Wilcox , Chao Yu , lkft-triage@lists.linaro.org, Johannes Weiner , Roman Gushchin , Cgroups Content-Type: text/plain; charset="UTF-8" Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, 11 Jun 2020 at 15:25, Michal Hocko wrote: > > On Fri 29-05-20 11:49:20, Michal Hocko wrote: > > On Fri 29-05-20 02:56:44, Chris Down wrote: > > > Yafang Shao writes: > > Agreed. Even if e{low,min} might still have some rough edges I am > > completely puzzled how we could end up oom if none of the protection > > path triggers which the additional debugging should confirm. Maybe my > > debugging patch is incomplete or used incorrectly (maybe it would be > > esier to use printk rather than trace_printk?). > > It would be really great if we could move forward. While the fix (which > has been dropped from mmotm) is not super urgent I would really like to > understand how it could hit the observed behavior. Can we double check > that the debugging patch really doesn't trigger (e.g. > s@trace_printk@printk in the first step)? Please suggest to me the way to get more debug information by providing kernel debug patches and extra kernel configs. I have applied your debug patch and tested on top on linux next 20200612 but did not find any printk output while running mkfs -t ext4 /drive test case. > I have checked it again but > do not see any potential code path which would be affected by the patch > yet not trigger any output. But another pair of eyes would be really > great. --- diff --git a/mm/vmscan.c b/mm/vmscan.c index b6d84326bdf2..d13ce7b02de4 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -2375,6 +2375,8 @@ static void get_scan_count(struct lruvec *lruvec, struct scan_control *sc, * sc->priority further than desirable. */ scan = max(scan, SWAP_CLUSTER_MAX); + + trace_printk("scan:%lu protection:%lu\n", scan, protection); } else { scan = lruvec_size; } @@ -2618,6 +2620,7 @@ static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc) switch (mem_cgroup_protected(target_memcg, memcg)) { case MEMCG_PROT_MIN: + trace_printk("under min:%lu emin:%lu\n", memcg->memory.min, memcg->memory.emin); /* * Hard protection. * If there is no reclaimable memory, OOM. @@ -2630,6 +2633,7 @@ static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc) * there is an unprotected supply * of reclaimable memory from other cgroups. */ + trace_printk("under low:%lu elow:%lu\n", memcg->memory.low, memcg->memory.elow); if (!sc->memcg_low_reclaim) { sc->memcg_low_skipped = 1; continue; -- 2.23.0 ref: test output: https://lkft.validation.linaro.org/scheduler/job/1489767#L1388 Test artifacts link (kernel / modules): https://builds.tuxbuild.com/5rRNgQqF_wHsSRptdj4A1A/ - Naresh