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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9D13DC433F5 for ; Tue, 8 Mar 2022 14:25:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347466AbiCHO0Q (ORCPT ); Tue, 8 Mar 2022 09:26:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344826AbiCHO0M (ORCPT ); Tue, 8 Mar 2022 09:26:12 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 316E04B872 for ; Tue, 8 Mar 2022 06:25:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1646749515; 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=kumltRP5xoYTs9zCrvASai08H9k31B5+7rHSh9VugPY=; b=aN7D5xEulCZO4qN5dGw0dpoS6gsjmzUc/Uu5dRThH8THuJ03gvhVJ5t2oCX9AT1rFAzJbz VIzI9nfc13VS5F1Wb6vXSMroz0Wc+YKQBzpw6p3UYNPuTKF6SehruKMB5Ows1Cn5j2p1U7 tTqCE2aO47szaAdMARSxBX4OKHTJHro= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-48-upSDMMqTOxuK4n5DCaNAYg-1; Tue, 08 Mar 2022 09:25:14 -0500 X-MC-Unique: upSDMMqTOxuK4n5DCaNAYg-1 Received: by mail-wm1-f69.google.com with SMTP id k41-20020a05600c1ca900b00389a2b983efso2345114wms.4 for ; Tue, 08 Mar 2022 06:25:13 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:organization:in-reply-to :content-transfer-encoding; bh=kumltRP5xoYTs9zCrvASai08H9k31B5+7rHSh9VugPY=; b=IdAI8FlbjFfPPcUV0X8l7DPI31/6jteCA/1ppY3yGUPy39iUJt9fBKZpV8lizr8Dv4 698fWp/TWBElNlKBlODEpWsc76oTKwWANyPve/uC2/TxeSd6hOYDS63CuXxR5Cja0MZQ hn8Lg7CwgxyHtN2OyvH3AU0cFVXX2hl2aRwFKN+xRrrnc75pN7T8Hs5wB/Na2xDGw5rh ZThZ7Hgpf/IDa1QUT0kQY0JgzszXWHkyyXYos21nR8Ji5lAjAuBmNqBNDf7jftlAqZ3/ F1RsGb8WPSew6xB6hsJr9uaM4qsg3elHwnRiBYGGWQ5Glt8o2KTLKzDBbTU/KmZ1SgWT yfkQ== X-Gm-Message-State: AOAM530IWgODyOpJ4jItaIAHyMyG3Jr3N1zs/IrlofF4TX0rhvofjztf QvG0dXC7SYiPh7AgLX0g4broRHGcgQ1OXnTaqkjPWhxABmEhcraWXLg/51P8jgmg7CsutdBTvfz aPXXbVjc7OjIf X-Received: by 2002:a05:6000:154b:b0:1f0:6019:ea3a with SMTP id 11-20020a056000154b00b001f06019ea3amr12330572wry.395.1646749512989; Tue, 08 Mar 2022 06:25:12 -0800 (PST) X-Google-Smtp-Source: ABdhPJxznZCLNljth4M8V08Um5+lfKLr3E/0Oh4tOhNEBRjr9ngJ4D3YE+L+JEPV/yWQExUVOsyeVQ== X-Received: by 2002:a05:6000:154b:b0:1f0:6019:ea3a with SMTP id 11-20020a056000154b00b001f06019ea3amr12330552wry.395.1646749512782; Tue, 08 Mar 2022 06:25:12 -0800 (PST) Received: from ?IPV6:2003:cb:c708:b000:acda:b420:16aa:6b67? (p200300cbc708b000acdab42016aa6b67.dip0.t-ipconnect.de. [2003:cb:c708:b000:acda:b420:16aa:6b67]) by smtp.gmail.com with ESMTPSA id v14-20020adfd18e000000b0020373e5319asm244959wrc.103.2022.03.08.06.25.11 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 08 Mar 2022 06:25:12 -0800 (PST) Message-ID: Date: Tue, 8 Mar 2022 15:25:11 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH 3/3] KVM: use vcalloc/__vcalloc for very large allocations Content-Language: en-US To: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: Michael Ellerman , Andrew Morton , Dennis Zhou , Tejun Heo , Christoph Lameter , Johannes Weiner , Michal Hocko , Vladimir Davydov , linux-mm@kvack.org, cgroups@vger.kernel.org, stable@vger.kernel.org References: <20220308105918.615575-1-pbonzini@redhat.com> <20220308105918.615575-4-pbonzini@redhat.com> From: David Hildenbrand Organization: Red Hat In-Reply-To: <20220308105918.615575-4-pbonzini@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org On 08.03.22 11:59, Paolo Bonzini wrote: > Allocations whose size is related to the memslot size can be arbitrarily > large. Do not use kvzalloc/kvcalloc, as those are limited to "not crazy" > sizes that fit in 32 bits. Now that it is available, they can use either > vcalloc or __vcalloc, the latter if accounting is required. > > Cc: stable@vger.kernel.org > Cc: kvm@vger.kernel.org > Signed-off-by: Paolo Bonzini Fixes: 7661809d493b ("mm: don't allow oversized kvmalloc() calls") ? Reviewed-by: David Hildenbrand -- Thanks, David / dhildenb