Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp269035rwn; Thu, 8 Sep 2022 01:00:52 -0700 (PDT) X-Google-Smtp-Source: AA6agR4cE+KRFpQZoYzFMwfcP5hd5ul9ljSI4YlpBR8iB4rmwN0aLeWm3FHoBhcWaO2fLI6WvF+k X-Received: by 2002:a17:907:9483:b0:731:2be4:f73c with SMTP id dm3-20020a170907948300b007312be4f73cmr5325279ejc.380.1662624052442; Thu, 08 Sep 2022 01:00:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662624052; cv=none; d=google.com; s=arc-20160816; b=JgK22tGAufAACj8JgQdXsQc7HIFFuz1fTf/nWKKtkVi1LgsIQHLxa1o8V6rjVmqSGs V8rEsdAXqpOb0XFZ1PHYmkMRfAQXbsSDVVqkxfKr8fN5Ri9uFRxtA4vUDI30N6cRq2Tp PP7s9gsulFwu3dt+NG6dVBSPlS+s84me8LeYemUdlNZ+kBX6EK7sHzn40uh15xmP14MY E0kPuOGTO+JGAulmX2hew+b+50cs0jSLlZeEEVvWaE/PGAfXLgQt1Jg+e+iRWM2yG7JH e46A0ASipgV5nokzeWwABrzYZEvxb3ulwDHsmIXu6+p4gdbH77YHPoI1KbUoLFM6LVv4 IqdQ== 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:dkim-signature:date; bh=wTEYgGZ5tSon77wS7vl2ROsEnkkCO0gsMgQptW+CPqI=; b=Vj/ysBTE3AMO+redosHfrV2t2yf7AC5Iu1CP2Ylgjtaq/j94EkLrx+7sWGx944iC/W u+zHNJ0TmFoLjf7sot8Ui96hgGkyFQi2VJJBsyt5k0rv1myXd08U5BgtliDfduslfrTR ihZmqg9iNXG34wT2yoZEM26nlWW/HjHAbyjP9kfsPqz8xvvEQGv/R8dYGzauUoNvYtP+ ZKhVQcW5jFtf3bxoAdKDrj2XXxFMTE4Ze1h1SiXvWCRpQZDMSZALlb6UCfrMGonAh4JF B54cy8AWso6Q2YQRCSH17CX3vqS2/3S8GFMO3hdSo3wvQXhzZVCsNJxy7TvKd2k8Nd/K hSHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=iJA14xap; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b8-20020a056402278800b004477532706bsi15955035ede.517.2022.09.08.01.00.27; Thu, 08 Sep 2022 01:00:52 -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=@linux.dev header.s=key1 header.b=iJA14xap; 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=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231274AbiIHHHj (ORCPT + 99 others); Thu, 8 Sep 2022 03:07:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38128 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231246AbiIHHHf (ORCPT ); Thu, 8 Sep 2022 03:07:35 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8F219FAB8; Thu, 8 Sep 2022 00:07:33 -0700 (PDT) Date: Thu, 8 Sep 2022 03:07:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1662620851; 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: in-reply-to:in-reply-to:references:references; bh=wTEYgGZ5tSon77wS7vl2ROsEnkkCO0gsMgQptW+CPqI=; b=iJA14xapCDtkxxFZ191Tkejngxj1CUcv4kW7CKzkjsz7ATcaQDWEu0NFSqx3I6BQdf18/S WTbuPmJUiio1UduO89kjDWGE8I/TqqMPK7/HJWAK+mBPhtt24ufrZC9OZJmb5VRtm8xK61 6ZzGjTRW6DZ8SglZivSmm0qDFb8PFdY= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Kent Overstreet To: Suren Baghdasaryan Cc: Steven Rostedt , Michal Hocko , Mel Gorman , Peter Zijlstra , Andrew Morton , Vlastimil Babka , Johannes Weiner , Roman Gushchin , Davidlohr Bueso , Matthew Wilcox , "Liam R. Howlett" , David Vernet , Juri Lelli , Laurent Dufour , Peter Xu , David Hildenbrand , Jens Axboe , mcgrof@kernel.org, masahiroy@kernel.org, nathan@kernel.org, changbin.du@intel.com, ytcoode@gmail.com, Vincent Guittot , Dietmar Eggemann , Benjamin Segall , Daniel Bristot de Oliveira , Valentin Schneider , Christopher Lameter , Pekka Enberg , Joonsoo Kim , 42.hyeyoo@gmail.com, Alexander Potapenko , Marco Elver , Dmitry Vyukov , Shakeel Butt , Muchun Song , arnd@arndb.de, jbaron@akamai.com, David Rientjes , Minchan Kim , Kalesh Singh , kernel-team , linux-mm , iommu@lists.linux.dev, kasan-dev@googlegroups.com, io-uring@vger.kernel.org, linux-arch@vger.kernel.org, xen-devel@lists.xenproject.org, linux-bcache@vger.kernel.org, linux-modules@vger.kernel.org, LKML Subject: Re: [RFC PATCH 00/30] Code tagging framework and applications Message-ID: <20220908070719.ootyzzbd47dd5rkv@kmo-framework> References: <20220901201502.sn6223bayzwferxv@moria.home.lan> <20220905234649.525vorzx27ybypsn@kmo-framework> <20220906182058.iijmpzu4rtxowy37@kmo-framework> <20220907130323.rwycrntnckc6h43n@kmo-framework> <20220907094306.3383dac2@gandalf.local.home> <20220908063548.u4lqkhquuvkwzvda@kmo-framework> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, 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 Wed, Sep 07, 2022 at 11:49:37PM -0700, Suren Baghdasaryan wrote: > I would really appreciate if everyone could please stick to the > technical side of the conversation. That way we can get some > constructive feedback. Everything else is not helpful and at best is a > distraction. > Maintenance burden is a price we pay and I think it's the prerogative > of the maintainers to take that into account. Our job is to prove that > the price is worth paying. Well said. I'd also like to add - slab.h does look pretty overgrown and messy. We've grown a _lot_ of special purpose memory allocation interfaces, and I think it probably is time to try and wrangle that back. The API complexity isn't just an issue for this patch - it's an issue for anything that has to wrap and plumb through memory allocation interfaces. It's a pain point for the Rust people, and also comes in e.g. the mempool API. I think we should keep going with the memalloc_no*_save()/restore() approach, and extend it to other things: - memalloc_nowait_save() - memalloc_highpri_save() (these two get you GFP_ATOMIC). Also, I don't think these all need to be separate functions, we could have memalloc_gfp_apply() memalloc_gfp_restore() which simply takes a gfp flags argument and applies it to the current PF_MEMALLOC flags. We've had long standing bugs where vmalloc() can't correctly take gfp flags because some of the allocations it does for page tables don't have it correctly plumbed through; switching to the memalloc_*_(save|restore) is something people have been wanting in order to fix this - for years. Actually following through and completing this would let us kill the gfp flags arguments to our various memory allocators entirely. I think we can do the same thing with the numa node parameter - kill kmalloc_node() et. all, move it to task_struct with a set of save/restore functions. There's probably other things we can do to simplify slab.h if we look more. I've been hoping to start pushing patches for some of this stuff - it's going to be some time before I can get to it though, can only handle so many projects in flight at a time :)