From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id F00A9C48260 for ; Tue, 6 Feb 2024 03:21:09 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 74DEC6B0071; Mon, 5 Feb 2024 22:21:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6FD176B0072; Mon, 5 Feb 2024 22:21:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 59E816B007B; Mon, 5 Feb 2024 22:21:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 4A8FD6B0071 for ; Mon, 5 Feb 2024 22:21:09 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F0AB7A1BC4 for ; Tue, 6 Feb 2024 03:21:08 +0000 (UTC) X-FDA: 81759927816.09.C5D9413 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf28.hostedemail.com (Postfix) with ESMTP id 4F136C000D for ; Tue, 6 Feb 2024 03:21:07 +0000 (UTC) Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=fDBcSPJB; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf28.hostedemail.com: domain of longman@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=longman@redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1707189667; h=from:from:sender: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:dkim-signature; bh=FcVv/5RBXXyL4uRMPvuDyJl99xGfle/eegK32/iguR8=; b=PpzIatGbLYDKUGojdw8LEMKHitFV33Afhwy2t0LqtNYMT1zfQZA+JW/8lciIBYXtL1jZbI DTniZiH9G8R7eeNC8EHxn6WUxOuhbreTMOuA6peG3x+Ig+mRZO6kADO3qtbg/FsJZfqRQK 2s/cuOlWr2gcAuapCcIlJfsOz8An8lM= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=fDBcSPJB; dmarc=pass (policy=none) header.from=redhat.com; spf=pass (imf28.hostedemail.com: domain of longman@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=longman@redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1707189667; a=rsa-sha256; cv=none; b=REUsyfEI0YsjwT92yhhDzDZf4Jj3wPaGeH61JBASxkFpLG/J++wU8zTNervF3sP/6aVi6C FXG2TpiZttbXv1yXIkBQs9/WeYrtqR6ZcP1LczD2q2wAioVBGU2Xkxnz5V6DOxSMQQto5u Jmw4fVYZ8fXJIjeMIIt62YGihe4BIqo= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707189666; 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=FcVv/5RBXXyL4uRMPvuDyJl99xGfle/eegK32/iguR8=; b=fDBcSPJBaExhhvTtHhYPUoTJ0imeT3HjD8U6luf4JoQc64uwuu3zm3gtsBcASkErzt7Csk xgrAAuURu93xanuplR56An24Bji87TVTnlWhl+/eYZUFPNOYSYVgceA+hXnlrjrE+Jw0xz zKBCJEWXNLyeAuzSYEBpgBYjS0mpEws= 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-286-q1G3jI78OEeWv3sa_NGZqQ-1; Mon, 05 Feb 2024 22:20:59 -0500 X-MC-Unique: q1G3jI78OEeWv3sa_NGZqQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 9138D83B86B; Tue, 6 Feb 2024 03:20:58 +0000 (UTC) Received: from [10.22.17.212] (unknown [10.22.17.212]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7CC0F1121313; Tue, 6 Feb 2024 03:20:57 +0000 (UTC) Message-ID: <2efa10b2-6732-4aa5-98ae-34053a5838ee@redhat.com> Date: Mon, 5 Feb 2024 22:20:57 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Do we still need SLAB_MEM_SPREAD (and possibly others)? Content-Language: en-US From: Waiman Long 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> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Rspam-User: X-Stat-Signature: bita66ayp14c4p554cpn34zrxy3pufn8 X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 4F136C000D X-HE-Tag: 1707189667-435883 X-HE-Meta: U2FsdGVkX18CbisbQTPLnwfvOdSossLvw2z7cZdC45j9zps6/pWSzcftSBvt7vK7dkneXTXJPFrQfR70kbm8PwAamDpeNsx0Z7K0NVVBoI9J7U/3NY1iyL3ovZKqwbWWw1HcCFElb/T2ra7Xs4PW8/ytI1JqVxOnrvNV0FB7x97L7sr6GzCXqS+bUHj5RDOngxGMNDlnE/BaJhb9jz99O5aY8kONTWzajocjahZQ7+rZgzOEscfVdqw7RXNT5zjf36roU8bvLP74yLEqggMCMDD1uHxn9AaLA7XseFZZhujlI4zMDbtpifWbkdGBYFLRFydrHJe5bPbtcGgbs3uOWm7NOakrQPBs4v0fXur43TS2eDioV7By9k/GZAMu7fu/w2LjIpVp3jKzQpjQOLsW2GQcyC4IhOebfa9p5VqFPW1eWq0PBq0CaaujLCmBCCeRiKqsGQoEi8ica1oJ50ujTU80gha0D3wYzXJqHFVFAiLs1Hy7B3iFrSjvoUegHF02aJoSQ+s+47BwRrDOSDCUJHQm6QhsMBzYBjQ2bflrdLcbYzjR+O5HX6P1UOeB9WDBOgg0w28DBIbf04AzU0OpbuewZMzq9xxtvBd5snSFJsed0j44Ugh3sKNWp16ov64v87opiL3uvCl6VlJCq2+pCGwbTNuOVj8KbuOiQq0FnsFAXJIlLGsmeHUu9S4iZcBOWvJ4qVMst/4J1+2M05DDgeP70QxOYv/UuFHPVR49VhK802ymPFlsuNHFueVQax2DEVdDt4oom/3vz2qsh17npxc1JIgFzVLePVUoYn8v0l+9Q69CvZari44lhcXUsnid20ScEWXHzdjF+2ViEhSVJhfBpNUTn18Mk51L4xoVHAWRNVYExUwJ+xw56IRmMH0XWJJMitU7stOkROMUkH84lcG1LsUA2dpXILRBjbX8/N86Y05qKYYYTmD93wB/jXC6EYyHSXqva0GxqPGq5K5 DhqY/wBj UurxuuefPJGSooGoAGCNY6jBTK77T/pn481OObPckfQ8wegIU97GKwgXcvJKQIoZXw9ocipxGraoknOKpbF5ASmSOD0ouWe7LUg7urwVaSznAUtUDmkTbZzt13sXZy84sv0v1 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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. Cheers, Longman