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=-3.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,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 27835C433E0 for ; Fri, 12 Jun 2020 09:43:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00FE920792 for ; Fri, 12 Jun 2020 09:43:42 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="B5zzUnrx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725911AbgFLJnh (ORCPT ); Fri, 12 Jun 2020 05:43:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726024AbgFLJng (ORCPT ); Fri, 12 Jun 2020 05:43:36 -0400 Received: from mail-lj1-x241.google.com (mail-lj1-x241.google.com [IPv6:2a00:1450:4864:20::241]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13CC5C08C5C4 for ; Fri, 12 Jun 2020 02:43:36 -0700 (PDT) Received: by mail-lj1-x241.google.com with SMTP id x18so10337668lji.1 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=iLxyV85iAGAdYBYM//a9Uw6duK5gpB+O0+hJ34G5bjgt//5lqDSW2ARlo+wPY8aRmG tVNUgYGpDy2ySRNnS4gT3kkSPDURoSLBZOYmKOBcWLjpWbCFlAB/sVkccHPOUV0vWtqi XzVRmquAKTiy2fVK59cV+QcSGJIECjIdeOWpivJwIT/LwMCG5SCEivqa+rZjaYgN7Acd D5qEHJOl24agmvleTlETiWmihNMqnPhquDSTNCzv0oYy8SL8XXPzTNxeLYdT3Hf8Omwi o3opbIPdMiS0hRNXPKjOE9ruTP/Uxu2ky6d6zLobrk/MdsqXn4s+Fj7Go4RL5Z7FDbZy 3HTQ== X-Gm-Message-State: AOAM530S8dOzPhqyZYaO+4MyLyDBLAVOl4rehfdtoOf14IJzXRxWKJRF lu03+WHTBOeb2jzE6I1jdQ1fXS1+1LuIrUudQAwBpg== X-Google-Smtp-Source: ABdhPJw5tmdt3Qb2oH83ueGFSlyEX7PXjd2r9+J99+ZU7hJQo8IwOlnJ7848er/3tfXq8Sq1AS7XMX8/8Aq5t7u2d+4= 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-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@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