Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1234748imm; Fri, 29 Jun 2018 14:02:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKgoQecrbkPGlrn9ll7L12PMYwWAo48a9dCs4l+sTEaM0is2EMJKQwfi6upciStNtSsM3xH X-Received: by 2002:a65:4dc3:: with SMTP id q3-v6mr13778331pgt.331.1530306152007; Fri, 29 Jun 2018 14:02:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530306151; cv=none; d=google.com; s=arc-20160816; b=ulhZWes1j2pKFwGIVkddiAsZs1TiDnniq7qZ0olyimrtcvaeoA4yBVjhWrSNH2xNoC 2WVTMD69SzCpyhAL542LHjv880PQuy5i5nR4S8aJ57VQ3K04o4qI634MpFQeu8teLGTo AoBub3jDLTmoKDDjx5FbQ/UXSCqGMTR3NYbxVtm3+dDYkhbTdR8iBoBgKMqERiynX5GX wVXRxJgkkp49m1EiI6LUdOxycpwf83THLE/1Ur6SiAUw8XPtZ6Cl3qv3zvropIzojM/M TXtoD/IRLDwvJWf5S0zY3jmbRHEWnbpQ+OHa23ullqznxp+vvgGPyS5MTjUEZfUtoK7k 592w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:from:subject:references :mime-version:message-id:in-reply-to:date:dkim-signature :arc-authentication-results; bh=DiOeDF4Qg8Nq27NSV8xjyeiyDTe9lh85B1mDmsAQp1k=; b=mOk2ynHd2gKqB7s63THJysBNGzkksVxL2pRa8vG3buS7DbDo7QRHLGA27oTjZBMaWq 5SHTXQinB/E6GTBxalihmoLaqv6unrmbShcHNTQcs+uO8LSKgsxXvqzxIkKzT00Aln6W VGUb7C76/ZnIqRqhk/VLR0vvu9iW5xWwGtVOyZ398yYXMbAP0Ryj0OtqSg/z77Cfbikz yMLRbX3cCZ6tQ2+KEbsnp0fTJp5GBDiRB34KfvEKWTJ6LMN475ZFLO539zY8wXhO3JcX Sq0KF3PQcAgZ3WNnNptvpaIDKqrE9dQx/xNxXlObLbAZG8MPx007xAT/KsqsmL8krT/0 O9oA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="a2c/cghg"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d22-v6si9140268pfd.182.2018.06.29.14.02.17; Fri, 29 Jun 2018 14:02:31 -0700 (PDT) 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; dkim=pass header.i=@google.com header.s=20161025 header.b="a2c/cghg"; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755091AbeF2S7J (ORCPT + 99 others); Fri, 29 Jun 2018 14:59:09 -0400 Received: from mail-io0-f201.google.com ([209.85.223.201]:41553 "EHLO mail-io0-f201.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751757AbeF2S7H (ORCPT ); Fri, 29 Jun 2018 14:59:07 -0400 Received: by mail-io0-f201.google.com with SMTP id t14-v6so7588562ioj.8 for ; Fri, 29 Jun 2018 11:59:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=DiOeDF4Qg8Nq27NSV8xjyeiyDTe9lh85B1mDmsAQp1k=; b=a2c/cghgED8Wtc1/rcLm5LcTuB9+tCbezzoXbhDjeeJUqBxWBq7l/TQEDwwkkG4k3V FooxioO8gyAHq2jjjK4dSTlYwdzO4vcXYIY5ryGfGQoOPPZ+JArC4v5aSsSrNQzHpcCw z92mL2gy3SU8g7bz3lF4aCbtzi17lwH6xvR/hdI1Zqj1M0da2bWrobHeD/MRuQmhRkUm NDTSyFzqP78UtkTJIOXX584HD8QGd2HHLhWUZrak6AW4KsfinIM2CwEonpXfRfax2rv+ A2l75HZvmWq+AjevFv9hPfq++wVzFLeeaNIELBjELcA78+cN0I2RgXuqnUG/Y4ezDqG0 7NhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=DiOeDF4Qg8Nq27NSV8xjyeiyDTe9lh85B1mDmsAQp1k=; b=lR2YnmH54ErHiH9OQqE95Y0tuhQhE4Pcmi7uJGbE0vMg8QNIrn8gvd07XMJqBY6Kjq paPMlzJL6aJY6LrlST5cV1A2ZeOVZwN0fKbEE1LAoVZtsDQnxaq5R8sTIodnN3U85zee Hz1GBwCaA6KJ4TVK4FsRcBtVbI75xa4bCkf7Yjpdb365MqP4pY/j08QM3JYIY5wUlqjY 8ow7XVVK15SHuSAznH1mM3XYv84Z55+poUgig0HNJ6zQDo6j4QRr3PQ8xPj+6WK2/GP6 JCP5yLvsfoNZ9xLSleg4WExbsaswlBdxoUF8b4+S3F3ly+QxrbHL3tCsAHnOLVHrnSAk nQsg== X-Gm-Message-State: APt69E2xKxoUrflCcl4RSRN4D9D0He+iwZTv43ODQApLtt2KEJqmOrtN Mgg0QRuDVzhUXaucOL/7FyorXD2Cz8Hy X-Received: by 2002:a24:212:: with SMTP id 18-v6mr1301136itu.32.1530298747048; Fri, 29 Jun 2018 11:59:07 -0700 (PDT) Date: Fri, 29 Jun 2018 11:59:04 -0700 In-Reply-To: <20180629072132.GA13860@dhcp22.suse.cz> Message-Id: Mime-Version: 1.0 References: <20180628151101.25307-1-mhocko@kernel.org> <20180629072132.GA13860@dhcp22.suse.cz> Subject: Re: [PATCH] memcg, oom: move out_of_memory back to the charge path From: Greg Thelen To: Michal Hocko Cc: Andrew Morton , Johannes Weiner , Shakeel Butt , linux-mm@kvack.org, LKML 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 Michal Hocko wrote: > On Thu 28-06-18 16:19:07, Greg Thelen wrote: >> Michal Hocko wrote: > [...] >> > + if (mem_cgroup_out_of_memory(memcg, mask, order)) >> > + return OOM_SUCCESS; >> > + >> > + WARN(1,"Memory cgroup charge failed because of no reclaimable memory! " >> > + "This looks like a misconfiguration or a kernel bug."); >> >> I'm not sure here if the warning should here or so strongly worded. It >> seems like the current task could be oom reaped with MMF_OOM_SKIP and >> thus mem_cgroup_out_of_memory() will return false. So there's nothing >> alarming in that case. > > If the task is reaped then its charges should be released as well and > that means that we should get below the limit. Sure there is some room > for races but this should be still unlikely. Maybe I am just > underestimating though. > > What would you suggest instead? I suggest checking MMF_OOM_SKIP or deleting the warning. But I don't feel strongly.