Received: by 2002:a05:7412:b795:b0:e2:908c:2ebd with SMTP id iv21csp198363rdb; Thu, 2 Nov 2023 00:23:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFdqh0NSNGJ9O/HQxw1eHZVLPs7uiEDuZ6txZF1MfESzv+fIEDDFZK21gOKm3V52XOqXYlK X-Received: by 2002:a17:90b:3887:b0:27d:433e:e69c with SMTP id mu7-20020a17090b388700b0027d433ee69cmr11125102pjb.18.1698909828313; Thu, 02 Nov 2023 00:23:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698909828; cv=none; d=google.com; s=arc-20160816; b=oLCIBaguVHxVVOcMIKTCN2wh9vr3SlpVIraKsxF0HSPc7SycuzpgXFd8zhWsZzHzDf A3i/BIue+YF2kvu6QFTX49NQ1r9Ysn2s0unC6x8ARRPmVogKSSDeC0WBdbRSmo2mIj9i RHy8JXVnyIBsN3QLttV5bOqlMNA8XP+w+zsDsSQzLxHbb0d/P5qFPkybSOTnASP1qn8u t79Dod2GpkDGjdGCvM7Ccpn+USlGxApdH55S9Q9Vi6hBuFavpY5LDNTgOKovD4R8aylg vnMLo909n2/Dx1U04WsoNGeY1A7pf+gP6F5Abcmfx7iBT9k+kgEPbwyatTSAEuEkc60d DJ6Q== 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=Pd7/lFtP4BYuqq3e5ONr1i/noTjwBlQpKuQjz8D374U=; fh=tkNg841t0SqoHpskXsv8CO5XuAfhMXz28RBQPs1WDbQ=; b=pP9aa0o7hK90qbwzYVOvSqQUznpV6vLzCaja9/wC4DL2rcTD6LyFBaX0jV0pNfQ4SC kvXKi5DtQ6LlGZsmk2eG7sJ0Z1WHiZSrA8/rvWzWSQPK4IR6fHfNPzFmX9VLIlEDZcIA CBiHl8fg14pqYrmuxRPixp+xHI8s9ly6zb3emd8gwbhR96NbxNm1oN5kWfi9TU2EGNWg gadimHI4pM9d3jdfyL4L+WAWneP91qhAylmSIqw61YR5Repaj/fwyblAWPnu7H0NOKpO 6+byOI43qMoq0p3VgU6P4uzw7woA4SUiffl+QUQPnpP0mDaMFEq/PnIUHw7dS4uw8z1i 2cMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Aizbkzh4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id g8-20020a17090a640800b0028076ad83e0si2376321pjj.40.2023.11.02.00.23.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 00:23:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@canonical.com header.s=20210705 header.b=Aizbkzh4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 0EE54801B30B; Thu, 2 Nov 2023 00:23:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233756AbjKBHXE (ORCPT + 99 others); Thu, 2 Nov 2023 03:23:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229445AbjKBHXD (ORCPT ); Thu, 2 Nov 2023 03:23:03 -0400 Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7505012A for ; Thu, 2 Nov 2023 00:22:57 -0700 (PDT) Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id D8A923F17D for ; Thu, 2 Nov 2023 07:22:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1698909775; bh=Pd7/lFtP4BYuqq3e5ONr1i/noTjwBlQpKuQjz8D374U=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=Aizbkzh4jNb/2LzSU+PaSBMwBqyab8eqoiUpmsB/IU82MH7QxNkkph8shV4sleMb/ 7P4PrJwRz9ysLzeyetE7p9w59cXc+58SJjGA9UVJipMKZJzvQCnVLlbzuy84P/zsRG G97PAaUy7Jdm6HRJNIuRU0dVxPEFnxf7Qp0aYi+ryzk7iFapISnmRNW7i3W4XRGo2O PUX5yauGroWA9ZVpa/KU82dxPHIBTIGZP8+eIcfyvVG00O4G6n+nDV0Sz3VWcSIT3H FWiA3rnCsPCBnfAvL9+p7doCfpWxKwd6dsuEBzSMR6FSrh4q9FSTz+8gXHynbgpPWR MWdUAfWjpKKNg== Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-9c749c28651so40333666b.0 for ; Thu, 02 Nov 2023 00:22:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698909775; x=1699514575; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Pd7/lFtP4BYuqq3e5ONr1i/noTjwBlQpKuQjz8D374U=; b=e5Ye7167S00Bt6TUqXjWrdQ9aU40zVK6DcRlT1DCiDcLooIS4wzFg5Qjqr3Uh7Kk8S WRMjhxDn7XuaJAdwaWWkEr81hSB5lFxcnuJA4/pVt6zHK/MVCkqDmKV/aHZzBWww+4Hw IGUeA3JoU6A90UHK7amLKz1jvR3lgZJIxSqijwnDOSi4BX93rvnyVxNwQ5PcEUvSTbVx u1/sScyid25tszYaerMKgG7/dRb3UCqK89gTtUipK9M0IzqWkMTLHe7kstn/FKDj06gH PQjjzWkF6Q44RYZ/akUPQboXRCseGE53VfY9l75hihJPDw7V5iw6GldR7jbosWev/n/N i7lQ== X-Gm-Message-State: AOJu0YyzVyc9dAgtoMS2lBGcZxQf9Er++i804ceKnJC3+MdXiRkXgMGQ S9AWwzjv77YKgQTO9FLpfylXhnOtyuD61OUV8POkyxA6mrxfR4YOYHVoktrHS/tIQ2tupAvXTvZ sqwgePG2N48/14nY7AmN5HWFP5fyIgdehBYp4mnc9tw== X-Received: by 2002:a17:907:2ce4:b0:9d3:ccf0:761e with SMTP id hz4-20020a1709072ce400b009d3ccf0761emr3442236ejc.49.1698909775543; Thu, 02 Nov 2023 00:22:55 -0700 (PDT) X-Received: by 2002:a17:907:2ce4:b0:9d3:ccf0:761e with SMTP id hz4-20020a1709072ce400b009d3ccf0761emr3442218ejc.49.1698909775093; Thu, 02 Nov 2023 00:22:55 -0700 (PDT) Received: from localhost (host-79-33-130-95.retail.telecomitalia.it. [79.33.130.95]) by smtp.gmail.com with ESMTPSA id v9-20020a17090606c900b009b27d4153cfsm781396ejb.176.2023.11.02.00.22.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Nov 2023 00:22:54 -0700 (PDT) Date: Thu, 2 Nov 2023 08:22:53 +0100 From: Andrea Righi To: Linus Torvalds Cc: Luis Chamberlain , linux-modules@vger.kernel.org, patches@lists.linux.dev, linux-kernel@vger.kernel.org, keescook@chromium.org, zhumao001@208suo.com, yangtiezhu@loongson.cn, ojeda@kernel.org Subject: Re: [GIT PULL] Modules changes for v6.7-rc1 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-1.3 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 02 Nov 2023 00:23:30 -0700 (PDT) On Wed, Nov 01, 2023 at 09:02:51PM -1000, Linus Torvalds wrote: > On Wed, 1 Nov 2023 at 10:13, Luis Chamberlain wrote: > > > > The only thing worth highligthing is that gzip moves to use vmalloc() instead of > > kmalloc just as we had a fix for this for zstd on v6.6-rc1. > > Actually, that's almost certainly entirely the wrong thing to do. > > Unless you *know* that the allocation is large, you shouldn't use > vmalloc(). And since kmalloc() has worked fine, you most definitely > don't know that. > > So we have 'kvmalloc()' *exactly* for this reason, which is a "use > kmalloc, unless that is too small, then use vmalloc". > > kmalloc() isn't just about "use physically contiguous allocations". > It's also more memory-efficient, and a *lot* faster than vmalloc(), > which has to play VM tricks. > > So this "just switch to vmalloc()" is entirely wrong. > > Linus I proposed that change mostlfy for consistency with the zstd case, but I haven't experience any issue with gzip compressed modules (that seem to require less memory, even with larger modules). So, yes, it probably makes sense to drop this change for now and I can send another patch to switch to kvmalloc() for all the decompress cases. Thanks, -Andrea