From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eu-smtp-delivery-151.mimecast.com (eu-smtp-delivery-151.mimecast.com [185.58.85.151]) (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 B3B1C2F22 for ; Sat, 1 Apr 2023 18:33:34 +0000 (UTC) Received: from AcuMS.aculab.com (156.67.243.121 [156.67.243.121]) by relay.mimecast.com with ESMTP with both STARTTLS and AUTH (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id uk-mta-310-9qR693MXNOmG_FSLux21XA-1; Sat, 01 Apr 2023 19:33:31 +0100 X-MC-Unique: 9qR693MXNOmG_FSLux21XA-1 Received: from AcuMS.Aculab.com (10.202.163.4) by AcuMS.aculab.com (10.202.163.4) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Sat, 1 Apr 2023 19:33:28 +0100 Received: from AcuMS.Aculab.com ([::1]) by AcuMS.aculab.com ([::1]) with mapi id 15.00.1497.048; Sat, 1 Apr 2023 19:33:28 +0100 From: David Laight To: 'Vlastimil Babka' , "linux-mm@kvack.org" CC: "linux-kernel@vger.kernel.org" , "patches@lists.linux.dev" Subject: RE: [PATCH] mm: remove all the slab allocators Thread-Topic: [PATCH] mm: remove all the slab allocators Thread-Index: AQHZZH7yC1nc5Yxd6ES5VUUdsjQvja8WxpGg Date: Sat, 1 Apr 2023 18:33:28 +0000 Message-ID: References: <20230401094658.11146-1-vbabka@suse.cz> In-Reply-To: <20230401094658.11146-1-vbabka@suse.cz> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: aculab.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable From: Vlastimil Babka > Sent: 32 March 2023 10:47 >=20 > As the SLOB removal is on track and the SLAB removal is planned, I have > realized - why should we stop there and not remove also SLUB? What's a > slab allocator good for in 2023? The RAM sizes are getting larger and > the modules cheaper [1]. The object constructor trick was perhaps > interesting in 1994, but not with contemporary CPUs. So all the slab > allocator does today is just adding an unnecessary layer of complexity > over the page allocator. Why stop there? Remove kmalloc() completely. With cheap memory isn't unreasonable to go back to compile-time settable fixed size arrays for all items. Should make 'use after free' much easier to track down. =09David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1= PT, UK Registration No: 1397386 (Wales)