Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp4248106pxf; Tue, 6 Apr 2021 11:22:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfRdTmEVlMj7VHJGYXDAFUxvJ4B69OCXbhVIcjlcGEr8XiXenzW/sfuGelUKJr20z0I5NT X-Received: by 2002:a92:6011:: with SMTP id u17mr4401269ilb.274.1617733364037; Tue, 06 Apr 2021 11:22:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617733364; cv=none; d=google.com; s=arc-20160816; b=v5CCLgDxRy9b1yTtR+zEWuhGWSHjJG58hxRYp+CehYkQK16b/uKWjYeyHXeN82gKVZ 6VjVWjtXmZ5l3bcSnesx6M5TS6mrQKCo3zvlxtOIZYSJrJLm0VZ29kuRv7GkHijnAcfZ CTWUE0RvnhSBSNRakJDHqbTjaWpy+W7W+vedgcLprBdOFxIEhupaMzZID1pRUURfLRb3 gu8KAeY0FU2TPXsUUu99RJlqCRHXhAIl7/z+2SPr/YrqCYt/13IYdiKKuVyPxvxZ9VQj y5oF1mOyMdcSZe/+7YD8SLv+1+6iE8Up0AGNNT8GC6yBOqgA9TWYCvp/xWYHm+ZNMdrq h7sQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+xOwykMT0eamXfCJ+cRJDX97KIiXiqqoybhZz05k4kE=; b=lDPa/hikQfZhF7aHGJgmB+DmvkeGTkB54HXz+pXEdMF09/+1QQdii1FlpxznHAIJ6b WLNJF+lpcv+T/2zh1mvTqDgrgr1cMjoMM+nMAij7vvq9TUbaH4EESDYbMtiMlrR3CNhD 3hcSvLD/Ct3yUJTqjX1E8LFkLrHHwP0P5PMy+KTvmHpX8Py2CMvJAme+arMm59UadNvQ 6SpdMV2dLDY2oWsK9y4rbwI98zuuru1hVoeVmP3jy1tHtsHaX7lz7ynSuEBPLYn3equn saPOMdYFuxIcY70dfvhZafnc4cv8Zhstz3cvBlaG0r859E8iVRC00v4uQUgz/fF2a/0G Ij4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=DtMYcBTn; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w19si17650265iot.31.2021.04.06.11.22.31; Tue, 06 Apr 2021 11:22:44 -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=@suse.com header.s=susede1 header.b=DtMYcBTn; 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=QUARANTINE sp=NONE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240210AbhDFJI5 (ORCPT + 99 others); Tue, 6 Apr 2021 05:08:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:54166 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234988AbhDFJIw (ORCPT ); Tue, 6 Apr 2021 05:08:52 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1617700123; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+xOwykMT0eamXfCJ+cRJDX97KIiXiqqoybhZz05k4kE=; b=DtMYcBTnjx9dUFxs4dTtpXmx9nd/IwUaDXm0RMNwa/2CTUnx1EHnOMHwhshsRa+WrtKYf9 zl9eTafKeg9ZNn8OTE71ArZg20dckZXIftKR09DLkU1YtMmhZ8fg8QE3XeW2sfX3Y/yPG/ j/k4GeKheiATA6gmPjKWrmV6LCjiNQ4= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 99685B135; Tue, 6 Apr 2021 09:08:43 +0000 (UTC) Date: Tue, 6 Apr 2021 11:08:42 +0200 From: Michal Hocko To: Tim Chen Cc: Johannes Weiner , Andrew Morton , Dave Hansen , Ying Huang , Dan Williams , David Rientjes , Shakeel Butt , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH v1 00/11] Manage the top tier memory in a tiered memory Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon 05-04-21 10:08:24, Tim Chen wrote: [...] > To make fine grain cgroup based management of the precious top tier > DRAM memory possible, this patchset adds a few new features: > 1. Provides memory monitors on the amount of top tier memory used per cgroup > and by the system as a whole. > 2. Applies soft limits on the top tier memory each cgroup uses > 3. Enables kswapd to demote top tier pages from cgroup with excess top > tier memory usages. Could you be more specific on how this interface is supposed to be used? > This allows us to provision different amount of top tier memory to each > cgroup according to the cgroup's latency need. > > The patchset is based on cgroup v1 interface. One shortcoming of the v1 > interface is the limit on the cgroup is a soft limit, so a cgroup can > exceed the limit quite a bit before reclaim before page demotion reins > it in. I have to say that I dislike abusing soft limit reclaim for this. In the past we have learned that the existing implementation is unfixable and changing the existing semantic impossible due to backward compatibility. So I would really prefer the soft limit just find its rest rather than see new potential usecases. I haven't really looked into details of this patchset but from a cursory look it seems like you are actually introducing a NUMA aware limits into memcg that would control consumption from some nodes differently than other nodes. This would be rather alien concept to the existing memcg infrastructure IMO. It looks like it is fusing borders between memcg and cputset controllers. You also seem to be basing the interface on the very specific usecase. Can we expect that there will be many different tiers requiring their own balancing? -- Michal Hocko SUSE Labs