Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp2790971rdb; Mon, 5 Feb 2024 19:17:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHOG+55EzidtrG1B4VWZMeJ2Rull10AIXEBVvVdRQ0dOPZgT9JifIdD44vK0d1laog3S1KV X-Received: by 2002:a9d:7998:0:b0:6dd:dd86:ad81 with SMTP id h24-20020a9d7998000000b006dddd86ad81mr1341367otm.14.1707189423735; Mon, 05 Feb 2024 19:17:03 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707189423; cv=pass; d=google.com; s=arc-20160816; b=TGP2rXs/ox2o0GGebWia8/eGNA2ueCLFiNQBWK3hNH0wZNQJ1hTXAGT69RitZvt9Al uMv4c100ECzcdosJBSTmp45hg+B3bxp6FBeurB1l72+P3fy2ojrlhqCsEGFmAqhoOgJI vH9iJSxaBeElgcOtXyD5MWrjjzr6+AHqm1TqINJUBD60IpODi62KzyKTBlF/mYqJwdbS hB2qXbaL1vS7hWF6wvIRr7T3KbMWT8Oi0X/t69bP93mMXr5cLpi3pLyKUHh1pT5Kr5wt zbq6oK16c8lMO1hmfjdYr8bIZdIu80zpZ96RXxlnIMkWyPLvoM/A44AEXr6kOSEYy2hy o9AA== 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:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=lNKnKIcGVgRey+WDdSS1pYfQz/TNzPFoLWEek88f+c0=; fh=mKkqlP8KZxmNYsrqOmCtfZkqlgXnGZT1x2IO+R5AHJU=; b=hHwPkQzJPo0iv46mVqORN7Z98FnkGWjehU/mP0QiSNkzbbUEmWQGZWA+MZkoORxkay /Yj4pzBoOnhzE0EOaDwRk5BQauR9f82ZbOeMKMo/H9knEA/vV9ABJMtTKvr2ss37apk2 xYNsPo5lDFMtGkeJJQHELm2hoS7ao8kXQKrurEnSbhWHXDq98gbSyUccXlJqnB+rsuq/ M0QAe/0IO32/WahdAFofQ5sZCkx20A6jzuGv1177446jQrmehV5Q3AWIA7cKyWptE/mk ePSmjdLTkZSN8sLYab3Mooegnifs7b5g/bc/S69NLM8ztp8Az5Nwl255C/mLRDnrSZGW k0jw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fLjFp1gP; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-54245-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCUQPMMqdPtqYsWXzP2tuoGV7LeAzvkJz5afPf9o0q/qtQWYXZIcd0jP7MV9htdgsjepr4S1V4I8muw9UuPjkitf+cNYbOh7S47/q1+LvA== Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id f5-20020a635105000000b005dbf103f1dasi930010pgb.104.2024.02.05.19.17.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Feb 2024 19:17:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54245-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fLjFp1gP; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-54245-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54245-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5E54A2881F6 for ; Tue, 6 Feb 2024 03:17:03 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B5F0F73188; Tue, 6 Feb 2024 03:16:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="fLjFp1gP" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (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 3B02B745E9 for ; Tue, 6 Feb 2024 03:16:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707189408; cv=none; b=UPDcJXwW0CqDxNU/51nLlf2+TbbM1uv4DRsHw7yjDShB/KLBOOgfL5xfWVF170s/kYME/doQ81fZI3kebw3MaiRhqIWIXI2ZDvODEgFSuV+yjnHLULSzsDmsAco8+3iTb52RL99Dzouet4jzdfsN2U57EDbKXbar3wzI3OcTdhQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707189408; c=relaxed/simple; bh=XlT/oFXhFBECcFABqd/c6XAVL8ZjWF+z5VrLDcUku2M=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ir93Lbme5VnU6xLkCBXhooOacpELj+02MjDC2wb2/pQMgQPrAnDQLT5U5OOdzpdOUV/EPN7FWCh6VpT3EXwdA2OjXUA1O7417OHTLWS+nZvEEmqBXzZphOd8zEPJoY98E6vDeP/ChnwVHaVdqI9oMMQ+rhxgetvedH9NCOLN6V0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=fLjFp1gP; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707189406; 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=lNKnKIcGVgRey+WDdSS1pYfQz/TNzPFoLWEek88f+c0=; b=fLjFp1gPXyFzxzchdA2BA5EN/FqJfsjtUcPnyym4RR6zbhiEKBu9+7nRiVCHJFwnKfGFHV V6fOrlBZUdGBgJZXrZwop81Wlo1mUtzWeGgWO49wvGz+HUHyNd3kVIXD8PCt88reY6pyCZ McMDn2S4l1382QRj0EGXYqwMHoBP9l0= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-650-K45c_6kFP7iWy58RcRhdfQ-1; Mon, 05 Feb 2024 22:16:42 -0500 X-MC-Unique: K45c_6kFP7iWy58RcRhdfQ-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 97904800074; Tue, 6 Feb 2024 03:16:41 +0000 (UTC) Received: from [10.22.17.212] (unknown [10.22.17.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8716B492BF0; Tue, 6 Feb 2024 03:16:40 +0000 (UTC) Message-ID: Date: Mon, 5 Feb 2024 22:16:39 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Do we still need SLAB_MEM_SPREAD (and possibly others)? Content-Language: en-US To: "Song, Xiongwei" , "Christoph Lameter (Ampere)" , Zefan Li Cc: Chengming Zhou , Vlastimil Babka , Yosry Ahmed , Steven Rostedt , LKML , "linux-mm@kvack.org" , Andrew Morton , Linus Torvalds , 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> From: Waiman Long In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.10 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. Cheers, Longman