Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp2726998rwd; Fri, 19 May 2023 09:22:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6C/k9tMlA8ALKYWUYkTOT01lmducfrgDKjql6wNOSgM1Egi9UKM3ac9ru3h4bMl/p1xy/4 X-Received: by 2002:a17:90a:984:b0:253:9548:91e1 with SMTP id 4-20020a17090a098400b00253954891e1mr829850pjo.17.1684513322740; Fri, 19 May 2023 09:22:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684513322; cv=none; d=google.com; s=arc-20160816; b=zu7J74ly1OjPbaTpjj1TRD4vYs0Bzf1/1HxlnMQ3WQvJIV09P1968B47lNud9OTdhl /jNr/zcTnrXMWbq8xchvYPfHqodJDqw/2bEsoo0Gcn3oUYIJ7+AXnj919q3YElFM5IqN /VR81/6DATwWv/EIdbnoTroUGf6u9mbewCH4cNp+zWYrnNYoWsBvuXL289F+Y5H01w+H /eWtLUIzNuGuzzQQHPDz/UJZ/rQh4SsKkQlQpY6MN/FlfX2ndGaVcj74B0p5+gQ8GSYG 1JIGxG0VSRfn3+Vnw5QYb3KV8+Vv16Ajk8CZV1aINLqjzzJKSbzOhqZiuMn8pwsOVk/X ERyg== 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:date:dkim-signature; bh=Fz+wK2bZP1sraT2XiN6NtrwE/rOfNyDpEE6MkPOkdOg=; b=tINkugUO6pXSnnSARwoIUMk0UrPd2R5l5NWq4iibWORDPukPD6lh86+gGLlAxIwBh/ DO5IUZ/f8vox6fAt7O1d840J/eBPtaloWyr0TB2hOGnpgCUckHDCpJBMnHlWbeXfUn4/ 1dcwNGWMDtSkKgrx+sVDacbPaYGdYil4eoBpn/TvOnJWMw3AxmTRuP7ED1ehEvlPNTHJ OC/G5DGfnu/3msMIP2pgJhmj6Z2odSFsZsK4ccrFdggx5itRyTvDKz/F6UV3VqVSDZah EOrwAcNxq6/KVZVDR1NSuypRqSCYskNrq1SdDTNfVs9zNAUT9Q+kX1V2oxMbHCpjXlsy TY5w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=eufy765D; 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=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q36-20020a17090a752700b00250a4d72bc9si1900900pjk.108.2023.05.19.09.21.49; Fri, 19 May 2023 09:22:02 -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=@kernel.org header.s=k20201202 header.b=eufy765D; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230204AbjESQPS (ORCPT + 99 others); Fri, 19 May 2023 12:15:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230224AbjESQPH (ORCPT ); Fri, 19 May 2023 12:15:07 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9557D10FD for ; Fri, 19 May 2023 09:14:34 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E7A6065912 for ; Fri, 19 May 2023 16:14:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 971B8C433EF; Fri, 19 May 2023 16:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684512869; bh=cj9XLln61NnV+iOtJGxKSspk1kIfcgYZKJDT3am1C1c=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eufy765D0jvm/ghu+mPlpSqSY5QRnhPl/E1ytFy0IkOma2vMgd21YFe5ivcmxAF6i bXQrLIDGSPVIn3PwHk4jhjfSx/433XuH5DO7GTA9qFKiKmYQx9zOAZ59EEBt6qIq27 fLTm7kZXVp3+60dzEEtsvuds4JY3GqfgCBg8fThbiQ2+d0KpFqwbegxPp2cSER8uvm AEEO88GrS5L9tEOwoFa7u2O7Ajj4Fuz96itWjYsiqXboee4CZsbi6dmSqzbN3wAzVN JpwXnC9LW/FvtyhAylJVBdT+fciGQ0Lz63JxKigbeuIKr5y9jBKsywHtrVeBw0cEjm BrjRBD2jWgFQQ== Date: Fri, 19 May 2023 19:14:14 +0300 From: Mike Rapoport To: Kent Overstreet Cc: Song Liu , linux-mm@kvack.org, Andrew Morton , Dave Hansen , Peter Zijlstra , Rick Edgecombe , Thomas Gleixner , Vlastimil Babka , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [RFC PATCH 1/5] mm: intorduce __GFP_UNMAPPED and unmapped_alloc() Message-ID: <20230519161414.GF4967@kernel.org> References: <20230308094106.227365-1-rppt@kernel.org> <20230308094106.227365-2-rppt@kernel.org> <20230518152354.GD4967@kernel.org> <20230519082945.GE4967@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 Fri, May 19, 2023 at 11:47:42AM -0400, Kent Overstreet wrote: > On Fri, May 19, 2023 at 11:29:45AM +0300, Mike Rapoport wrote: > > Your allocator implicitly relies on vmalloc because of module_alloc ;-) > > > > What I was thinking is that we can replace module_alloc() calls in your > > allocator with something based on my unmapped_alloc(). If we make the part > > that refills the cache also take care of creating the mapping in the > > module address space, that should cover everything. > > Yeah, that's exactly what I was thinking :) > > Liam was also just mentioning on IRC vmalloc lock contention came up > again at LSF, and that's historically always been an isuse - going with > your patchset for the backend nicely avoids that. Unfortunately not because we still need to map the pages in the modules area which is essentially a subset of vmalloc address space. > If I have time (hah! big if :) I'll see if I can cook up a patchset that > combines our two approaches over the weekend. Now there is also an interest about unmapped allocations from KVM folks, so I might continue pursuing unmapped allocator, probably just without a new GFP flag and hooks into page allocator. -- Sincerely yours, Mike.