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 E9690C61DA4 for ; Fri, 3 Feb 2023 09:00:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232502AbjBCJAp (ORCPT ); Fri, 3 Feb 2023 04:00:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56322 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232462AbjBCJAk (ORCPT ); Fri, 3 Feb 2023 04:00:40 -0500 Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com [IPv6:2a00:1450:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F4F5928CF for ; Fri, 3 Feb 2023 01:00:38 -0800 (PST) Received: by mail-ed1-x52b.google.com with SMTP id be12so4504324edb.4 for ; Fri, 03 Feb 2023 01:00:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=resnulli-us.20210112.gappssmtp.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=tOmBX+JFGzHeh3HwbWQ3WsjWoMbr/hW5pwzke5pae9o=; b=lhcv1O85T1j9+JkwWAs13ZEbDJMw1J/GHfnBfP9Y1Tlr7pZdw8GA5nZnOQ2Hjid1ni 1k48+uB90Kf0vuXIK45p85TT/ksioHFUok1B6O4zY2jwVq7itola7GRbqgxt2HIVs7h8 G4FvQH6geXL8jV+PWStFb8xCqB4x1R/ZVYoqB2qFPxeB2jw+Ck7Iru3F+ntJY3MWhUMn aiGCE23l6ELvO/hH8Qy3P10ReMU/+NoPVKeeJAzoVFaQFzVaqxJaLRMu034VfpffPsU3 GUpjKK0mUiGQgyCL6kMj7eFjU0GfYgMbp4wABl77bb5Tfu/t8PcjXQaCCTHiM0OD7JR7 pLAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=tOmBX+JFGzHeh3HwbWQ3WsjWoMbr/hW5pwzke5pae9o=; b=2P+2ItO9euBH3AIxmJ11vmffW8v+QslR6vW6yZM1N0B160Vorozec2BdZuAQQE9SjB i0U3hW0CGeU7avDxuXrE7Dj/IAd85uasVNHgl7SnAM8AAJ8KPRcFDertMxbdD2filJyH E4/zblgIPjOygHsPl7zHsYNFIEyxN2HcIuSiBE5GwnZU4Qt9d5m8BWrPml8k4lRdG99X oJa0Wu/Mj04D/pJw7F0BCD4i+d7Lou02RNAny61pcOY1ak24oSQPg59KdiLqXuEN4wub olFmC4YHvFK0hZ2st3n58Ku+EmBP5UjloqJ58WJRAJuf/rtSAviR8HUN5HOqMTqlhJAS hsXw== X-Gm-Message-State: AO0yUKWtjsgHvs+R+g/f1njxueI34gNCB+pChTKaxuVkk/i6YFTePzMq M9xJz+80JpaOt+WsndmEezc6iw== X-Google-Smtp-Source: AK7set/cBY+YaBO8Yc+HKz4QkBw0D86mvHB1uC/RAiiKBq3J8GAf/tCJRaTK6a6X2bohYQznH/EAfA== X-Received: by 2002:a05:6402:f06:b0:499:d297:334e with SMTP id i6-20020a0564020f0600b00499d297334emr11045289eda.20.1675414836536; Fri, 03 Feb 2023 01:00:36 -0800 (PST) Received: from localhost (host-213-179-129-39.customer.m-online.net. [213.179.129.39]) by smtp.gmail.com with ESMTPSA id ez22-20020a056402451600b004a2666397casm784882edb.63.2023.02.03.01.00.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Feb 2023 01:00:35 -0800 (PST) Date: Fri, 3 Feb 2023 10:00:34 +0100 From: Jiri Pirko To: Eddy Tao Cc: netdev@vger.kernel.org, Pravin B Shelar , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , dev@openvswitch.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v5 1/1] net:openvswitch:reduce cpu_used_mask memory Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Fri, Feb 03, 2023 at 09:52:56AM CET, taoyuan_eddy@hotmail.com wrote: >Use actual CPU number instead of hardcoded value to decide the size >of 'cpu_used_mask' in 'struct sw_flow'. Below is the reason. > >'struct cpumask cpu_used_mask' is embedded in struct sw_flow. >Its size is hardcoded to CONFIG_NR_CPUS bits, which can be >8192 by default, it costs memory and slows down ovs_flow_alloc > >To address this, redefine cpu_used_mask to pointer >append cpumask_size() bytes after 'stat' to hold cpumask > >cpumask APIs like cpumask_next and cpumask_set_cpu never access >bits beyond cpu count, cpumask_size() bytes of memory is enough > >Signed-off-by: Eddy Tao Eddy, could you please slow down a bit? Why did you send v5 right after v4? Could you please always put a changelog to the patch submitted to contain info about changes in between the submitted version? Thanks!