Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp497875lqt; Thu, 6 Jun 2024 09:27:26 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXufRC8Mg2XYtU057KG9qrKHHOItfvQ/rsMwhW4dimg0QIF5CcH+hCoWegrHurACLhQIK6cNeuMYtriwpIKA5VAR8HpdagRVtzegXKkKg== X-Google-Smtp-Source: AGHT+IGoLshL8ANqtH5ixEfaBbj4CG/0Xb3cSXrTGokVMBJfRFAcBZ9T8cOArUI0l3l3plMiuSKM X-Received: by 2002:a05:6214:5901:b0:6af:c703:27d3 with SMTP id 6a1803df08f44-6b059b62834mr888836d6.8.1717691246547; Thu, 06 Jun 2024 09:27:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717691246; cv=pass; d=google.com; s=arc-20160816; b=CNPYbfocwVweJ48Mb+ZuONBeKoxkoebcIDGF3vNmQy6PjCJvySD8gTguf7lHE4Lp90 aDXHU8kjyUVHhtDRF2U7RVdLDFAVTdvC3w1DIf7hFtPpPKerHvP0G7bO8UF9m9Fz2dg1 2jvX+rSPqP0o79GNhap3WOXsXpY6xIfXjec266xZ//J0O8+a2bOVDJFQGAo75mzeK+ln Fjf2cb1FFdD/EPu4EVVFXMUfYzvqabuNakriXoymUEAFacLcK1uRoyX8A7vzuNMTYVpY KJSOK8RA+dVgivea03ZbnLwt9f83gGqeJPNmtC0h8//CXS5VEGowE1y1iy1QsFdu/V0G DLHQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=Zc35zwXCZA8aJwxl0L2+2+tz2QAmC27va9700n0AGgo=; fh=QbvAQda5HOO77Yar1kKBSFj25McCrjke4kATm1VU0y8=; b=Q1vVuHWhc5+QUAs8h08u3MgtBHtrgxK8s6L9PEmMz20k8ld5OpDWZhnFAPOXvxxxzG rRYZDxNd0s5ImffsqIwwjLbbvtGnafQ5TnVXanrDsnyojXs27lK+OnGbeXMvOwbRAMiw IxVstyNdVNVCqFUYOdh7VwpiDM0fGsskbr9sJSMp/qZxmU0mu9mrFzPCXq6uoYU0Wepk gusZ/mNB5Iww3KLX/UgkIKVHlKuUrKlGLYWdwp49RRPqgR8+pwqLPXJ56jYmJEmUU9y2 UUAeMNel8v0V4e6sRYQw1n1jYBN7whrBsObzU73ExHx84a7J97M/WoH5jn6nL4iYr8OB UNkg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LJuVXrKH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204697-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204697-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 6a1803df08f44-6b04fa43cddsi18830226d6.557.2024.06.06.09.27.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jun 2024 09:27:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-204697-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LJuVXrKH; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-204697-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-204697-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4306A1C25D73 for ; Thu, 6 Jun 2024 16:27:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9950F19752F; Thu, 6 Jun 2024 16:27:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="LJuVXrKH" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BD74826AED; Thu, 6 Jun 2024 16:27:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717691239; cv=none; b=A5tXEF52+Y6VDlynpO+NU0iw2/nxdEu9joCX3qUYo3C/uM3m67pC5IQCyEE72zvaUJmx76yh7Z1r7QLIPUVhtOHJ4xCVyRgQNnTz+6HYz9QDybmW9gE7SIc98/lZ59JDVvhciiNGhkGIMNqp41FmHo86ieL7+w3f8LHuHWcDsMQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717691239; c=relaxed/simple; bh=6VICEBA+N+C44oFl2sfagYtTaeVv9T6hSa3ovrDQ06w=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=QxTZ4elHHIjZ4HdP1q6L2W8kk28rCMPZBqo9iZvD7PMJk/BqeofyxT6QwXaiamuyi9DFw9F/WVoDE4boziT226E/yFW+uiqwHXD2SicT986lbDNgy1oO6EKGRY3eziQlwiejj+oTu2Img0PWFy8BDzW91kpwUWIOSF6xS4YZmpU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=LJuVXrKH; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E6A8C2BD10; Thu, 6 Jun 2024 16:27:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717691239; bh=6VICEBA+N+C44oFl2sfagYtTaeVv9T6hSa3ovrDQ06w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LJuVXrKH1Z77lg0LTOl/7x4pd87ipJUtEp0dJ3Ub1iNbRyrxlP7J+mSekcyqxCwPp qdi3iuLdUyx5Js1XPZVKibe7ff1ueZISw5vBetcmgwGcs75E6hSArqzz+Fy8+UN9yg fh0U2VpofJhe+ynMCY4lDHOGNnXezIOVTwEo8qIXS9yZEYI8Lr3kywJYH3II13vE8S vodypQM4e9qK2O302wEYxzDL9mgPYLdZlgecMhcE/7/dTg7+Gy9XmNA+PRc/lWF2ic N5qP5T+Ao1l801gQr6aePJmSU9ikKGLuS+957VETT3RH6x4a31HTsJQO+tv8vmAlTi RogrcSv4qY44Q== Date: Thu, 6 Jun 2024 17:27:14 +0100 From: Simon Horman To: Jijie Shao Cc: yisen.zhuang@huawei.com, salil.mehta@huawei.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, shenjian15@huawei.com, wangjie125@huawei.com, liuyonglong@huawei.com, chenhao418@huawei.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net 2/2] net: hns3: add cond_resched() to hns3 ring buffer init process Message-ID: <20240606162714.GN791188@kernel.org> References: <20240605072058.2027992-1-shaojijie@huawei.com> <20240605072058.2027992-3-shaojijie@huawei.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240605072058.2027992-3-shaojijie@huawei.com> On Wed, Jun 05, 2024 at 03:20:58PM +0800, Jijie Shao wrote: > From: Jie Wang > > Currently hns3 ring buffer init process would hold cpu too long with big > Tx/Rx ring depth. This could cause soft lockup. > > So this patch adds cond_resched() to the process. Then cpu can break to > run other tasks instead of busy looping. > > Fixes: a723fb8efe29 ("net: hns3: refine for set ring parameters") > Signed-off-by: Jie Wang > Signed-off-by: Jijie Shao Reviewed-by: Simon Horman