Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2313832imd; Fri, 2 Nov 2018 09:16:15 -0700 (PDT) X-Google-Smtp-Source: AJdET5dFi+5zMnS8t81Z/PmdR4j7N9HNI8U1OWd5CWdvSg7rfS1/BjPuHXWCoDX6TpDgFgzdP5IA X-Received: by 2002:a63:6483:: with SMTP id y125mr11290903pgb.91.1541175375129; Fri, 02 Nov 2018 09:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1541175375; cv=none; d=google.com; s=arc-20160816; b=d8Pf0EVCPBYJ16ipWaQBY9uizO9o9c+zZy+pGHXsQ9ZpOkZ4+U9UyF9XFZo2gsTcky 3Wap207rGg+BrpKIV5rpxwwst0muOPBI8wZRUCNDMLD2NGv8nzaltwOicRKysa5B+iIu pFopqIpvu8rJIdeUvAbl7ZsopCrkqHHDb8uu70jXD3ZFfihDvt+qso/b0QBCITvb6Vv1 lRJ5HDg97Bn90OF0AOniqKg17OLQebWIExfJF4CkgWTNCISDYbg44crYop/JMy7mqt7O T/8Z/gC/9waXHKRqMY/Ajdteu5XZMWIlqEInDGrc19jw+Jmy7npB9YA6al0NmIag5nIp HCPA== 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; bh=ITMFO8OuxdrMxUVxj42/ZD9J9DbBjM+M3GeI4ld9Lbw=; b=pmpa3Mr3Vnto7fbHzGd2cqs8tIw6fiCvB6w5lf4IeF7L+nx1KNOeKdRDCYGP1KElsD HFcUwI3cLMmz0iHBLwEFAH2r37pop2Szp3gUa8ACCI/dPUKpSN0Le943Jip3D6Krv2Ov BbnPeMLdEoNDWdZKLSw+BKTEw57Ya5Clyqk2kA6Sz+H+omtiGTfumxQGCwusTgm5XZzF T8QPU9jQfgqfObiHFlxK46xXOXitJTrjYe1fR68/yM83wWyld6wBFZwQWmnmB45FKFmY 70y7u9shPrnfsc2YW1y1TA9N0UOysPUdBzBx9u3C2uMfK62VKYy4xDJH5ZHjmgrZ8lxa 6P2g== 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 133si12848475pge.246.2018.11.02.09.15.59; Fri, 02 Nov 2018 09:16:15 -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 S1728053AbeKCBUz (ORCPT + 99 others); Fri, 2 Nov 2018 21:20:55 -0400 Received: from mx2.suse.de ([195.135.220.15]:53120 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726085AbeKCBUz (ORCPT ); Fri, 2 Nov 2018 21:20:55 -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 39667ACB8; Fri, 2 Nov 2018 16:13:16 +0000 (UTC) Date: Fri, 2 Nov 2018 17:13:14 +0100 From: Michal Hocko To: Roman Gushchin Cc: Dexuan Cui , "linux-mm@kvack.org" , "linux-kernel@vger.kernel.org" , Kernel Team , Shakeel Butt , Johannes Weiner , Tejun Heo , Rik van Riel , Konstantin Khlebnikov , Matthew Wilcox , "Stable@vger.kernel.org" Subject: Re: Will the recent memory leak fixes be backported to longterm kernels? Message-ID: <20181102161314.GF28039@dhcp22.suse.cz> References: <20181102005816.GA10297@tower.DHCP.thefacebook.com> <20181102073009.GP23921@dhcp22.suse.cz> <20181102154844.GA17619@tower.DHCP.thefacebook.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181102154844.GA17619@tower.DHCP.thefacebook.com> 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 Fri 02-11-18 15:48:57, Roman Gushchin wrote: > On Fri, Nov 02, 2018 at 09:03:55AM +0100, Michal Hocko wrote: > > On Fri 02-11-18 02:45:42, Dexuan Cui wrote: > > [...] > > > I totally agree. I'm now just wondering if there is any temporary workaround, > > > even if that means we have to run the kernel with some features disabled or > > > with a suboptimal performance? > > > > One way would be to disable kmem accounting (cgroup.memory=nokmem kernel > > option). That would reduce the memory isolation because quite a lot of > > memory will not be accounted for but the primary source of in-flight and > > hard to reclaim memory will be gone. > > In my experience disabling the kmem accounting doesn't really solve the issue > (without patches), but can lower the rate of the leak. This is unexpected. 90cbc2508827e was introduced to address offline memcgs to be reclaim even when they are small. But maybe you mean that we still leak in an absence of the memory pressure. Or what does prevent memcg from going down? > > Another workaround could be to use force_empty knob we have in v1 and > > use it when removing a cgroup. We do not have it in cgroup v2 though. > > The file hasn't been added to v2 because we didn't really have any > > proper usecase. Working around a bug doesn't sound like a _proper_ > > usecase but I can imagine workloads that bring a lot of metadata objects > > that are not really interesting for later use so something like a > > targeted drop_caches... > > This can help a bit too, but even using the system-wide drop_caches knob > unfortunately doesn't return all the memory back. Could you be more specific please? -- Michal Hocko SUSE Labs