Received: by 2002:a05:6602:18e:0:0:0:0 with SMTP id m14csp3092525ioo; Tue, 24 May 2022 12:53:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyY9DzvCFoo8Ym1loLrqhlz7fNXYur4ntVoNmilsn9ucz5+yARWGSxk+CEYOaaua8z53gPB X-Received: by 2002:a17:902:7586:b0:15e:c2fe:bad0 with SMTP id j6-20020a170902758600b0015ec2febad0mr28258713pll.72.1653422019503; Tue, 24 May 2022 12:53:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1653422019; cv=none; d=google.com; s=arc-20160816; b=bV4j+HU0ysii9V4Vd6k3EmWDx+9tZZn35zqK1Wigxm3dmjj7QWDT6xP4PZcT5KVpAE gOlp1wXBaWLepSwzEy9QoKxBzYn0/BIbI49diBQfSIEypA7RhhcvE/dVk8Rfrbr/Vw7U TQt5IuGYhwNOWDZb4Lu/Uc3Pu94AHAPlt2w4EdQhFmOoB+AtmRmcrnVCScE/UOJlsNKM Xp4XK3jjmg1XB3a+2JQ613Ampp2ACy2a96aw/a3EGcnM3cyDhFtaVIdQ8Ugs0jgOuaF8 QrRvYmsgNz6en4rM0I5lRq1HKIY5xRM+Os1cCB10sEl2RaMYfjlRJyIFVaoxwlh4juJF +EVw== 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=a/JkmIrb3U0V/yu8PhyV+N8XrbjKAUo7AoBVKzx+G8o=; b=CjW+1UVyP0o6wK4b+DQ6lH3kJ2D9UEubDxc27QVsJyF6sLddmvmV42iscdB/GwRHtU yAPIVvMe1+ZrN2mpc4ehOf+5eM04bkWJ5WrdLIKBxNs+VPvDJjqyx3Q+neTNZR5J55/0 Uyr54Oz5NHBZfaXvfDSkjJIvY+wlSjQF8j07+eZ39JWmZP3hGGw4ZOaq+k8rF8/U8cLW alT0HSRsYON302/6hPYIxXoWYYD513L/n6/ggc+aW+n+lm4hScSDYYCFhsxbiPNrXUMc ZgRIRJjxUCsRhuKMzN/TCzLLkHa1A6neLaYE8DLZ352CCUebaSi67UegW3yM+vdJ+DUo PDpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Rb3brHeS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j72-20020a638b4b000000b0039f0abb5197si15133547pge.29.2022.05.24.12.53.28; Tue, 24 May 2022 12:53:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=susede1 header.b=Rb3brHeS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236246AbiEXKrd (ORCPT + 99 others); Tue, 24 May 2022 06:47:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34172 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229824AbiEXKrb (ORCPT ); Tue, 24 May 2022 06:47:31 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2B1A35F276; Tue, 24 May 2022 03:47:31 -0700 (PDT) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id A43C61F8B8; Tue, 24 May 2022 10:47:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1653389249; 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=a/JkmIrb3U0V/yu8PhyV+N8XrbjKAUo7AoBVKzx+G8o=; b=Rb3brHeSayt8ozGawjFpwJcpvr999BpR3pDQSkTLuEcz3hN1uVvTRiwpyoqnj5WBbqdbfP /TQRnq2orPaNUKVKgZnKJ3ryV4w0E7kHBeTVB+jZF4GkIEu7LsnZuQ7uoEYsdoPSKyWcFL gpRbufrymhC1QhjhY7nO7Vta82G2XVw= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 360582C141; Tue, 24 May 2022 10:47:28 +0000 (UTC) Date: Tue, 24 May 2022 12:47:28 +0200 From: Michal Hocko To: hezhongkun Cc: hannes@cmpxchg.org, roman.gushchin@linux.dev, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org, linux-mm@kvack.org, lizefan.x@bytedance.com Subject: Re: [PATCH] mm: memcontrol: add the mempolicy interface for cgroup v2. Message-ID: References: <20220524103638.473-1-hezhongkun.hzk@bytedance.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220524103638.473-1-hezhongkun.hzk@bytedance.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 24-05-22 18:36:38, hezhongkun wrote: > From: Hezhongkun > > Mempolicy is difficult to use because it is set in-process > via a system call. We want to make it easier to use mempolicy > in cgroups, so that we can control low-priority cgroups to > allocate memory in specified nodes. So this patch want to > adds the mempolicy interface. > > the mempolicy priority of memcgroup is higher than the priority > of task. The order of getting the policy is, > memcgroup->policy,task->policy or vma policy, default policy. > memcgroup's policy is owned by itself, so descendants will > not inherit it. Why cannot you use cpuset cgroup? -- Michal Hocko SUSE Labs