Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1823049imm; Thu, 16 Aug 2018 03:16:58 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwqzTEd66JwXaSPxustVVhKMnX8SK4D1ejXmG7Tw/Gd47ELAiWWxtbH6V4y3D/XcTzWu4Mv X-Received: by 2002:a17:902:6bc8:: with SMTP id m8-v6mr28666621plt.162.1534414618135; Thu, 16 Aug 2018 03:16:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534414618; cv=none; d=google.com; s=arc-20160816; b=c64sZTsOacIrZG1LNKEkIfHcVjcRTewJCEXkf+TKUZ/PBQlzJROJ6VaKxYJc/RUybV 5DTymAUVgt31Kh22CfgAuJWlmzPJZp/vioUNGXUD6S/T2lCnEILzbIYfkveHUZV5HVqX M7cadyy1gwMAwsosrnCs0R/KLratXSFajjY70gzJx05WQ+WkFv7PzUTPd0mJZP3ctw/q ncCh07prHRu8ghaWhNLT963qDyxXRqOOsl064z1RETbAEhOM66/Gdc3jVCTwN4/+KhsV 5Nh0Gwmj211X/TLw+zhoUWfWrZaAaI5XKuUm2t9naNkFWthTLdsduD5QC3SXw+CM2u6O /IaQ== 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=PeOw+dYW4N+RWihWHSLQHjNil9wiKva9LqwefSATyuA=; b=IkSKZv2/bMlIjFgxFmQoqoo1FfZpaBEWfP3kwzNpd9nL5H2G1rHhCrbsVSnxK0MfAZ 1giapUVe55NOX2+uD8pLTvvZgkjKDVsl8TqQs9BhTuo6p4VAEmBGoZ0grcGTzySjwQ7Y V3iiU/00ZcJomPzRzEQ/cxfoHC+1GiKdIEEoq+kz4mMJNtEmhWVPf2GBOVVW/vVJyFxq /1pob8OsRSqhzqvf55eYo95oSH4gSUwnHZb16Ym05RUhnqv2delg8kqiNjr+27mcQMNS qyv/D9EbIdPoks4ZUoViHP3zf6ngNzly5UOFqQadpPxkFdtr+La7TaxuJNZLxuMRxEBC ob+A== 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 b8-v6si20879421pls.137.2018.08.16.03.16.42; Thu, 16 Aug 2018 03:16:58 -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 S2388893AbeHPJb0 (ORCPT + 99 others); Thu, 16 Aug 2018 05:31:26 -0400 Received: from mx2.suse.de ([195.135.220.15]:40374 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726335AbeHPJbZ (ORCPT ); Thu, 16 Aug 2018 05:31:25 -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 8E732AE85; Thu, 16 Aug 2018 06:35:10 +0000 (UTC) Date: Thu, 16 Aug 2018 08:35:09 +0200 From: Michal Hocko To: Johannes Weiner Cc: Roman Gushchin , linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@fb.com, Andy Lutomirski , Konstantin Khlebnikov , Tejun Heo Subject: Re: [RFC PATCH 1/2] mm: rework memcg kernel stack accounting Message-ID: <20180816063509.GS32645@dhcp22.suse.cz> References: <20180815003620.15678-1-guro@fb.com> <20180815163923.GA28953@cmpxchg.org> <20180815165513.GA26330@castle.DHCP.thefacebook.com> <20180815172044.GA29793@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180815172044.GA29793@cmpxchg.org> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed 15-08-18 13:20:44, Johannes Weiner wrote: [...] > This is completely backwards. > > We respect the limits unless there is a *really* strong reason not > to. The only situations I can think of is during OOM kills to avoid > memory deadlocks and during packet reception for correctness issues > (and because the network stack has its own way to reclaim memory). > > Relying on some vague future allocations in the process's lifetime to > fail in order to contain it is crappy and unreliable. And unwinding > the stack allocation isn't too much complexity to warrant breaking the > containment rules here, even if it were several steps. But it looks > like it's nothing more than a 'goto free_stack'. > > Please just fix this. Thinking about it some more (sorry I should have done that in my previous reply already) I do agree with Johannes. We should really back off as soon as possible rather than rely on a future action because this is quite subtle and prone to unexpected behavior. -- Michal Hocko SUSE Labs