Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp630703imm; Fri, 29 Jun 2018 03:55:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfSREyg1VM9Wu9aNmeYE6RLbz+qOAu4irnrv8iS6Moi0BOLtJFJFnck+9n/Xm8G4kOJENTg X-Received: by 2002:a65:4c41:: with SMTP id l1-v6mr1263723pgr.310.1530269734589; Fri, 29 Jun 2018 03:55:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530269734; cv=none; d=google.com; s=arc-20160816; b=00F2Pnv1i24Je5COjYtgdxThfc1fnj7x99QIrwGfVYryNzF9qwt9a0yeSjvu7bF9AK vAy6y9duauHjKG+CFd7ejmtwX/c7mUMvgOz/h9Vz7JYobdJrAdMGItYWMqatscAVhlgv pXWHR7fRWeXOC36KVvL+P99T/41rGFCjdPIPXEAEf+tCm1dFuwNS9KtIwsSuwxklgXhr sBByDI8MOoDocs7mTYTKTCDvDZczrkc6xlGk+WUGxUN42IyMzabrRMkRC0xogPlKHYzH rQXUuWkGa/PeNFy4Un9reRa/kBSk742qw8/p6Ko92wSCRbH1f9WDNzziqoPJuDb61wdX yUoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=0gKxFn5OBWmp6ALg8RVR5V4dJO6wBni6JHIReAsH/0E=; b=PgBh4bE/AOkCf/GpcpsHylh3O1U36umwVBwmUgHMiPyQVX1DML4TA0RqzfMcwokbIH k7hhgQXKkCzG7/fE/8zsVhX5no2RxHMT7KqaKQCLI4Dbk0GTuL+Xalw68U4N+7r7b6yr ZBuxIqcVAuIakQTFUXqeaC+MeeUiXLxac51X1mMAnXHxAuURXR26j5qwcitIyVF8hDmG oETk3VpfbqytvL9RqRevsb8b+ve/Q4CPsWhzeKMTYmyyJvUJ8WFJH7O59eLuMuI9lwg9 eFskmy57rxwfF9Gq7/icruviyZ16SbGcwiG+4ts8AhR/Tqxsz24aEWTZBl2EPxbZFN2i DvWQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h68-v6si7993319pgc.429.2018.06.29.03.55.19; Fri, 29 Jun 2018 03:55:34 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753530AbeF2HVf (ORCPT + 99 others); Fri, 29 Jun 2018 03:21:35 -0400 Received: from mx2.suse.de ([195.135.220.15]:44690 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751679AbeF2HVe (ORCPT ); Fri, 29 Jun 2018 03:21:34 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 6BFBBAE1F; Fri, 29 Jun 2018 07:21:33 +0000 (UTC) Date: Fri, 29 Jun 2018 09:21:32 +0200 From: Michal Hocko To: Greg Thelen Cc: Andrew Morton , Johannes Weiner , Shakeel Butt , linux-mm@kvack.org, LKML Subject: Re: [PATCH] memcg, oom: move out_of_memory back to the charge path Message-ID: <20180629072132.GA13860@dhcp22.suse.cz> References: <20180628151101.25307-1-mhocko@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? -- Michal Hocko SUSE Labs