Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1608210iof; Tue, 7 Jun 2022 08:33:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZgUQmyk5MR+7SnJ5jGeivLflLrqzKhf8qYNHuUKgqcep+iM4MolTfJVgFxVWuE7VsMyJl X-Received: by 2002:a17:907:9689:b0:710:f8a0:145c with SMTP id hd9-20020a170907968900b00710f8a0145cmr17227429ejc.386.1654616032309; Tue, 07 Jun 2022 08:33:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654616032; cv=none; d=google.com; s=arc-20160816; b=jkikj1fYPF9mccq9py5f7oBcNW4cVSTnYIKD+D4zOJvaeUh4HOT1gw1WrSurT6HEWk PlJLzQpI5KC1WTAjEhYYG7tRmPWe9Sq6mHR7ffy9lb6JtGTPwiKYtH3cO1Bn+UpLxM4v hZyXah4nkLIP0UZpJdaVRghvIOdAGyKR6Ih0BkffKIrPBZS+dfpFCi9jDHJzfQBBSWQH WWmaXW23JpKQgVOM8vg5RTrFkzBC1PU85oNNi86k71FxA6EVw1Nbf+D+CQYzdttpkD4G P5EHFNZTkNog9g+LOMHl0FgOiPdogMcy41B+lWQhXTF+t0sUSglSnRxQ4AZaIIZs2+1C /cdQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=C6W+Eu5u0Y2TVLVC3Z3gxvXA75csS9fj4QfnmD8nAwo=; b=tuAkZRI372jx3wtMlfsJ5C+0Hw5q73mzSH5IFN/WTtyqHp4RLIlCczjHdi8G+mVJ/k xyMS+6ico+21LEwEqMDtFCh9/RwCVe/KhnT8m6jO3bx5n7PjUO5trGtMdFcxrkB1WpkG l77g7NpxfkakAi8e9C339HNcMW3KeYSHSEpBLqX0PfAGFooyCSCnpx8nT3ea1UOOiHpt LG9QN43QufH2wZps3ZjVId5JgmVlYezXO4arRp2OZ+ySNu3t0fA9Gh8ipr2JculHCpND 9RyNJ66ZhVabWQagTeoMQrtxPxnrwJGWpLcv1n79scTmZ0hRAVe1iExbs34XgKg2Q5JI esFw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=Xmp2jUxg; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bs8-20020a170906d1c800b006fecf448d83si13908196ejb.220.2022.06.07.08.33.24; Tue, 07 Jun 2022 08:33: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=@bytedance-com.20210112.gappssmtp.com header.s=20210112 header.b=Xmp2jUxg; 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=fail (p=NONE sp=NONE dis=NONE) header.from=bytedance.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236481AbiFGD4T (ORCPT + 99 others); Mon, 6 Jun 2022 23:56:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236464AbiFGD4R (ORCPT ); Mon, 6 Jun 2022 23:56:17 -0400 Received: from mail-yw1-x1132.google.com (mail-yw1-x1132.google.com [IPv6:2607:f8b0:4864:20::1132]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4A406C9ED4 for ; Mon, 6 Jun 2022 20:56:16 -0700 (PDT) Received: by mail-yw1-x1132.google.com with SMTP id 00721157ae682-2f83983782fso162349697b3.6 for ; Mon, 06 Jun 2022 20:56:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bytedance-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=C6W+Eu5u0Y2TVLVC3Z3gxvXA75csS9fj4QfnmD8nAwo=; b=Xmp2jUxg/6CW8CBqHPgwq9NZJ4s0us1G0eU99OQC2GjN0qPysqB5bVl4TFxyvqJ1eN dBeSmTJ+w0gBEk80CVEaGgO1qr2vCm3P7qWckKOLjx/ZSTOui6LM6T3YqaIzV6SRBeVB gfmFToylzWBKMi/FQr0OXMQCYu3eUxiFfCGBR6UiladWI1mKEsmGiRGd/ZF6WWiJoKTk +10TqBBiKotkjw06hp/DYxlrwwe/rQAieGdHPSPTcpomtZJe6yu2DaUjuMqhqrvgbVtW Z+WjWrnTjxTKK8ZyMJj6M3Um5mIIsEcaDPIUyVekq+W6a/C9XwSPZuYjrCXXyy7bLTSF jBpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=C6W+Eu5u0Y2TVLVC3Z3gxvXA75csS9fj4QfnmD8nAwo=; b=WgQBYcO7trGVZffn7G57qIwUK9z6BmaE6jMZ/eUVl0aKyrQ1rv6d26fQYiNxHgGhP3 OTWgCBB+9S+n61puIdvJbExmCh2U56EIv0TU9b70BpBJyQ0WuCidMtatonRHf37TIQhY 9gw1oQZaKvly00iCQkOO1uSiLR7TM55RNQySan0tmsLwmbFJ+OOZ0gOnWFCtNG1Sk/+P wmJCn+BRfDZJdk6/iYUzpH72Ma8VFkbhg32X3j5YNx87iktYibJ2NDxWFBw58yZf/122 sXf7NiCAbbjWZheVAuGXmRBUlGXsMnBLne/8k3GYWW1RjQFJXCiONY08nAnBWkc/JHt3 6Ekg== X-Gm-Message-State: AOAM531E72d9SeyhJCdW97KVKO3/2Cg4wBb9JVEVjjmq9leunW7ENmdY jNwNfhv58H5bOr2zJBbZ6kmRM32nKT+SMJEv0JkUhg== X-Received: by 2002:a81:a1d3:0:b0:30f:c7f0:7b62 with SMTP id y202-20020a81a1d3000000b0030fc7f07b62mr27517115ywg.458.1654574175597; Mon, 06 Jun 2022 20:56:15 -0700 (PDT) MIME-Version: 1.0 References: <20220606070804.40268-1-songmuchun@bytedance.com> In-Reply-To: From: Muchun Song Date: Tue, 7 Jun 2022 11:55:39 +0800 Message-ID: Subject: Re: [PATCH] tcp: use kvmalloc_array() to allocate table_perturb To: Eric Dumazet Cc: David Miller , Hideaki YOSHIFUJI , David Ahern , Jakub Kicinski , Paolo Abeni , netdev , LKML Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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 Tue, Jun 7, 2022 at 12:13 AM Eric Dumazet wrote: > > On Mon, Jun 6, 2022 at 9:05 AM Eric Dumazet wrote: > > > > On Mon, Jun 6, 2022 at 12:08 AM Muchun Song wrote: > > > > > > In our server, there may be no high order (>= 6) memory since we reserve > > > lots of HugeTLB pages when booting. Then the system panic. So use > > > kvmalloc_array() to allocate table_perturb. > > > > > > Signed-off-by: Muchun Song > > > > Please add a Fixes: tag and CC original author ? > > Will do. > > Thanks. > > Also using alloc_large_system_hash() might be a better option anyway, > spreading pages on multiple nodes on NUMA hosts. Using alloc_large_system_hash() LGTM, but I didn't see where the memory is allocated on multi-node in alloc_large_system_hash() or vmalloc_huge(), what I missed here? Thanks.