Received: by 2002:a25:1104:0:0:0:0:0 with SMTP id 4csp379414ybr; Fri, 22 May 2020 08:46:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyPI/Z0PENrJAx9SL8jRfQ9740L5jBWXb2kznNqwe7kRw6YneyDoYDoKEnUZ0bjqe5fqaVR X-Received: by 2002:a05:6402:144a:: with SMTP id d10mr3341660edx.67.1590162365479; Fri, 22 May 2020 08:46:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590162365; cv=none; d=google.com; s=arc-20160816; b=ZeWx26aISYUGx/+qJG/tQG+Et5WHHx6H2U81dbE38G+Cbebs63pVVhTdjTrmaGC5U0 NieaopJPhFRWOo7yCjASnKrSkrxYIq547Nr9Ncs+ZO4gOFR/KZ+fnJ4wKWEqJE7/7M7s dbHwKXLygWR4dAkgmTJtpdpIgVm1/1i7Duq2KKXt/cKJd5fEdZMW2rq/w82AIuUuZ+6X cPsPMyRiQ5zuQy9qYVOLnJNpbSb9kSu1DqULOA6EM8TAMZ1PGGtjXIoHvTSN4mH6hYwO XNdvtRLgDos66LCsxvvgDlYeMe5c4djqln0uO5YE0A8NRMu2vJ068cbOIW5YVvgYih+V YHAQ== 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=oOYVOHpaIS+oIho1dCUDLjlIT96AiPQqcbd2UVpV+2w=; b=y0mbVN3Z2qKzmLGi+Hw42/N3dt9pNqEOXbQNM+CkhI0lPtpPU841TPTqPbuCDvK9I/ /ZaZvZCaBjAxJSFhpQDx9EKSQEb5lcmnZAT10gCRoRGMYJgNNKuNfi/xQb4hM4YNxoW6 zXUTab2Uc62UzicNAv4ZQ1cNmeWWoa76nMcDn2/ULOzBJro+2AfOg/eax5cRClHWods7 j5BLBjLjh/h/gFmuRWggoocvSK9L+A2Olqgkmmrcp7tKhh7lGSKQMCi2Tc1fd+lfTLaG Do97TJsDRgVKMLyAxpP+/WnX40hfmuKS/u/Bq5lyg3XKsaZurwzEiLqlu1xrOBc/gmW9 sDFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=xc5YNUMi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 p9si4971914ejo.380.2020.05.22.08.45.42; Fri, 22 May 2020 08:46:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=xc5YNUMi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1730183AbgEVPmJ (ORCPT + 99 others); Fri, 22 May 2020 11:42:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729040AbgEVPmH (ORCPT ); Fri, 22 May 2020 11:42:07 -0400 Received: from mail-lj1-x244.google.com (mail-lj1-x244.google.com [IPv6:2a00:1450:4864:20::244]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 628EAC05BD43 for ; Fri, 22 May 2020 08:42:06 -0700 (PDT) Received: by mail-lj1-x244.google.com with SMTP id w10so13224623ljo.0 for ; Fri, 22 May 2020 08:42:06 -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=oOYVOHpaIS+oIho1dCUDLjlIT96AiPQqcbd2UVpV+2w=; b=xc5YNUMinAG4CGXABpBRi7fN1jT3RAq5g34Fsehb7FeGfXYItR+jv9zdzFUbWBZgED LmniBIdug9ZVwtsM86rfNB4Ym0c53ixm9EKzBW+98lrn+8iymUA1pl2rPFTIORF5gQ62 S7DQ9GAYdIyD0+h/PDFxltIl+vny9nvjNZwtDFWooA9AaFqDP1f1M3b8WEMP5ciTcCjp W9NaNLJ0XScz6f3UhpDiAU5ZGmdgvxMde4+OxowuByFtU+aSTB2XW+29FZ21ruR/AtlZ X2z7XizfkhRaPFBSCM5YrIriiEQ/BuEbJkBwj+XeDUcSN1pBzeruIIxoHJrH2wvAAVgG WYVA== 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=oOYVOHpaIS+oIho1dCUDLjlIT96AiPQqcbd2UVpV+2w=; b=liPhdbl/A2wNlvvVdchUhSpA9zYM/jxl/x1s39GCGRZtYGp42KU+mTKhln/HR4DaT/ xZclwvpRWbSosqEWy9G16VFHoiwwbE1vV83LgkjJ+PDN8/SZutUK1WjmNlI1FQ5FaWQe f3/92/OJcHAMuFN4/a+Z+2XfBpe2m2wEkciXiAM2+Ru51LscGnCOS7pbkIo/4Wn6L4Xm I4RCsp/BePO66jbkrMFRswzeaqC6p0kUNtTnr3x80hd0iS6blbzMJQQrk0dnl7hKUa7Z +z9rTcv5jDQ4JNMb6rXjQpCPqOzMOURnFAJZ+9KWFbNq+Ow4OVpWfDqIKGiAKR2aod9r t/dg== X-Gm-Message-State: AOAM530l7skN7KhTqoh7x+Cp6VdxkrIRjSaBKcr4qV+AGHN+ogDBdWSv dDeOSJbWKxPpZfWTRXDTpXBAZwdh4RUYhmdawq39NQ== X-Received: by 2002:a2e:150f:: with SMTP id s15mr7582617ljd.102.1590162124742; Fri, 22 May 2020 08:42:04 -0700 (PDT) MIME-Version: 1.0 References: <20200505084127.12923-1-laoar.shao@gmail.com> <20200505084127.12923-3-laoar.shao@gmail.com> <20200522114544.GA1112005@chrisdown.name> In-Reply-To: <20200522114544.GA1112005@chrisdown.name> From: Naresh Kamboju Date: Fri, 22 May 2020 21:11:53 +0530 Message-ID: Subject: Re: [PATCH v3 2/2] mm, memcg: Decouple e{low,min} state mutations from protection checks To: Chris Down Cc: Yafang Shao , Michal Hocko , Andrew Morton , Johannes Weiner , Roman Gushchin , linux-mm , Cgroups , open list , lkft-triage@lists.linaro.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 22 May 2020 at 17:15, Chris Down wrote: > > Naresh Kamboju writes: > >This patch is causing oom-killer while running mkfs -t ext4 on i386 kernel > >running on x86_64 machine version linux-next 5.7.0-rc6-next-20200521. > > I think I see what's wrong here -- if we bail out early, memory.e{min,low} > might be uninitialised. > > Does this patch fix it, by any chance? > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index d3b23c57bed4..aa902b9cbb79 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -5046,6 +5046,9 @@ mem_cgroup_css_alloc(struct cgroup_subsys_state *parent_css) > memory_cgrp_subsys.broken_hierarchy = true; > } > > + memcg->memory.emin = 0; > + memcg->memory.elow = 0; > + > /* The following stuff does not apply to the root */ > if (!parent) { > #ifdef CONFIG_MEMCG_KMEM This patch did not fix the problem. The test log showing oom-killer link, https://lkft.validation.linaro.org/scheduler/job/1445128#L1194 Build images: https://builds.tuxbuild.com/YqW37GVsCHf8ndxOT2z1iQ/ - Naresh