Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2793819rdb; Mon, 5 Feb 2024 19:27:19 -0800 (PST) X-Google-Smtp-Source: AGHT+IFdmV4Hb18gWFJjq8Yvc7n53mJIvjdAZlRma/kXAwXmrglpkA/2m5xK57rDNiArgt0/m9Aa X-Received: by 2002:a05:6a00:2b4b:b0:6dd:8767:2fa1 with SMTP id du11-20020a056a002b4b00b006dd87672fa1mr1085335pfb.0.1707190039289; Mon, 05 Feb 2024 19:27:19 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707190039; cv=pass; d=google.com; s=arc-20160816; b=FpYEWuDLR78hCHwJnXxXxjbFkW+qoCm85c9m5rUe3hMpwWfIac3/98kEH7C4ir+bu/ Zkk7crvfzn7OBsMVP+XJwZ9iU6KoQ1f+kTbNLBWJpTL6IStGj8ta42fNI+7oVJngsYrP N619+Egi75u6nNQvpP+3zFLC01fhvGQZUY5XtOJR9FTV3wUeq4jSfQEXNKqt920gnUd5 jDCA9cQOf271j+TZDUxIiE9Te8LW/3FgoUun7AyeJkTSYxqa4kUkXgqZD7OSYekm9bHw yBFaQM2Ajo0cKcoXY8dpSexzbrk2v7cR93dDWTDKlREjB9/bYHvO1xTHacD7E4n81xsm MF+g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature:message-id; bh=ClD2Z6Jo52GcH++My4a6PnVyBVRkcPKgaDGiH7iNA/k=; fh=l0YBU235A6/u0SLCx4/0XMLVfy9Jh3lrLgisvke8NnI=; b=j4/l28y6vukI5S1Kx3bbJqqx28nPNS1WK+JUeaVuriBa8jRDdir5BKiBnGBVvWbJ9L q+YKUwcuKUZJ4TbPx2Oq3JivEMDultNQqq1mIv8VHd5ZLYnsrg/SS+Sg8zIpp8y2Ev8Y mF9sKA1acNCSYA2Bh5KurCgHepic3Hn4G/iTYCAJJLPCQq45jxAFXQCPL1gil2m4hXr6 fo90/KTw1hDcsJo+V0aSBo+8rRC6LZx7D7oifB3VSKFAsDXgabQoo0RErf7aq1+q1CC4 m33L7MAVTcX8/YUusAc8orZ/CExRwmOYluqK6FATLwgCFGr9EEMWuFvZUSbB6APuWfD2 fs4A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tNOLalON; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-54253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev X-Forwarded-Encrypted: i=1; AJvYcCUoszmq3C3cD4KvkP7Fx8IYL3JKCTQQgoQ5HgSWcUYDgRRglpOZbw3xlqq69qeEo4nF9hK7DqnW3BsxHop9akapxhFWF9KRP4y53Fw9xQ== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id k10-20020a633d0a000000b005ce0b70d2b0si931005pga.102.2024.02.05.19.27.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 19:27:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=tNOLalON; arc=pass (i=1 spf=pass spfdomain=linux.dev dkim=pass dkdomain=linux.dev dmarc=pass fromdomain=linux.dev); spf=pass (google.com: domain of linux-kernel+bounces-54253-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54253-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 42B93B240D5 for ; Tue, 6 Feb 2024 03:26:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8495E745C1; Tue, 6 Feb 2024 03:26:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="tNOLalON" Received: from out-185.mta1.migadu.com (out-185.mta1.migadu.com [95.215.58.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39B8A6E2B0 for ; Tue, 6 Feb 2024 03:26:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.185 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707189988; cv=none; b=knTxdyeUxXgN9pyoHB60dQCSTE5UAW5rt0IvXwT0YPy47dXFClI5xGxNzQk73eR6JI3IgegVEfoZf1NO0RyyFq4buGSdnMI5oOf0DzZT0QYT7AfcmLqUMUJWYuhJ4cgKL70ER3oAKVt7Q1183R8hhV4RzM3NRjy4ED7u2bT/O0s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707189988; c=relaxed/simple; bh=ZkTX61I2tt36xodQQmRzMrJjNf1JsLLmeuhhpXbqOYo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bcUQh9ySaVF1ZY6NmE5NvK8CF0PkfooaSfJW14M9xh3muSpD5iiM4vRsubyn3H057Ir+j93ZjnXXP0l0QCuji4b9ce/mwJljuWW/EwvLhT5gxv1z16pfqbmdEXsb+sX1H4gIfoJaEAKItikMX9j468tmzT4NKbe4NhjFKA+enbc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=tNOLalON; arc=none smtp.client-ip=95.215.58.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Message-ID: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1707189984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ClD2Z6Jo52GcH++My4a6PnVyBVRkcPKgaDGiH7iNA/k=; b=tNOLalON7SIXvMIFxF/K/Mn422ezvF3obOVRSojEkr+3MyY7JBT2TZoivbxMFGfoheZSZR Cjk3ZAZpBimhXqD+8iYSQYcMYlV8DxvXn2ro4ZHCi5H/JKQ9WJ+o7Rkm9/Fio8gfwcKH7V yhPF3WxlasNzIK//syGGSWpPSfbWb1E= Date: Tue, 6 Feb 2024 11:25:53 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: Do we still need SLAB_MEM_SPREAD (and possibly others)? Content-Language: en-US To: Waiman Long , "Song, Xiongwei" , "Christoph Lameter (Ampere)" Cc: Vlastimil Babka , Yosry Ahmed , Steven Rostedt , LKML , "linux-mm@kvack.org" , Andrew Morton , Linus Torvalds , Zefan Li , Kees Cook , David Rientjes , Hyeonggon Yoo <42.hyeyoo@gmail.com>, Chengming Zhou , Zheng Yejian , "cgroups@vger.kernel.org" References: <20240131172027.10f64405@gandalf.local.home> <61af19ca-5f9a-40da-a04d-b04ed27b8754@suse.cz> <698633db-b066-4f75-b201-7b785819277b@linux.dev> <2efa10b2-6732-4aa5-98ae-34053a5838ee@redhat.com> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Chengming Zhou In-Reply-To: <2efa10b2-6732-4aa5-98ae-34053a5838ee@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT On 2024/2/6 11:20, Waiman Long wrote: > > On 2/5/24 22:16, Waiman Long wrote: >> >> On 2/5/24 20:46, Song, Xiongwei wrote: >>> Adding the maintainers of cpuset of cgroup. >>> >>>> On Sun, 4 Feb 2024, Song, Xiongwei wrote: >>>> >>>>> Once SLAB_MEM_SPREAD is removed, IMO, cpuset.memory_spread_slab is useless. >>>> SLAB_MEM_SPREAD does not do anything anymore. SLUB relies on the >>>> "spreading" via the page allocator memory policies instead of doing its >>>> own like SLAB used to do. >>>> >>>> What does FILE_SPREAD_SLAB do? Dont see anything there either. >>> The FILE_SPREAD_SLAB flag is used by cpuset.memory_spread_slab with read/write operations: >>> >>> In kernel/cgroup/cpuset.c, >>> static struct cftype legacy_files[] = { >>> ... snip ... >>>          { >>>                  .name = "memory_spread_slab", >>>                  .read_u64 = cpuset_read_u64, >>>                  .write_u64 = cpuset_write_u64, >>>                  .private = FILE_SPREAD_SLAB, >>>          }, >>> ... snip ... >>> }; >> >> It looks like that memory_spread_slab may have effect only on the slab allocator. With the removal of the slab allocator, memory_spread_slab is now a no-op. However, the memory_spread_slab cgroupfs file is an externally visible API. So we can't just remove it as it may break existing applications. We can certainly deprecate it and advise users not to use it. > > BTW, cpuset doesn't use SLAB_MEM_SPREAD directly. Instead it set the task's PFA_SPREAD_SLAB and let other subsystems test it to act appropriately. Other than cpuset, the latest upstream kernel doesn't check or use this flag at all. > Ok, get it. So cpuset_do_slab_mem_spread() can be removed, but this cpuset file interface and PFA_SPREAD_SLAB will be keeped. Thanks.