From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 252363905EB for ; Thu, 20 Aug 2026 18:48:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787251701; cv=none; b=XLoHindlZcbgDsYC97hbIVN2t4FupbHPyW7WEw3TaNvES6uWvArbD/WvvDydhzWOmvxmxGUEbye6Pkbfp4Qcg/GgsPNtBSWOuGuCgWyGkaV8dooPDsIMyAyZ3FVezJdrdGq+iM/KEUoqRPNaoaqMRkb6xKIcWL1PJd3cpQ4PAVw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1787251701; c=relaxed/simple; bh=DagOCJfxBXNwljrYC665sUjHBiesPxZrZUo+2adcKXg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=briG1x25D8FncC8X/9fpWL8NBCe1OCTkd/Nh4Qp5e3hfzCuKd71VDTuacH9VH1KzRzgaX5AyOzpP5aXruphHSWTzSDZDLy+LmKQxzX6PJShteUPXQpd0s8mTC41PELIDhHAVVTAc9Co6rxdrSg/OIK2/FomjoP39F7MDKY+KZpI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=msleUt+1; arc=none smtp.client-ip=209.85.128.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="msleUt+1" Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-4955aa106b1so1939855e9.0 for ; Thu, 20 Aug 2026 11:48:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1787251698; x=1787856498; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=VHzC+rmY032qjqVbZyRDQwA9P9FdJrsCi8GUAUfuieY=; b=msleUt+1sPpg/k43BzzhbOFl8+flh4hlBYT832PzN5sZ/o+GPHJd65IyEmuZZRoK7r r/g1hFwnpKo4LcI5FBmB/PLY428ArSuUmLghj7X9Db7zLEcRnp/4DJYKbAJUIv1q9RGC EPgTMGuJvMIq2nLm4RYzQSciZOSbUQdCc/OTg3cUp+j1WYhTdspTVmtZBWD7L3LVggjA PtDsbHg9eP4I9wuWjAKLvJN0uICZlbrAEubJyo2m1E9PFwJ9wpn1WhE4ZQAaA9IVcYIT Vs2GFLOmr8JGVLJEf9uZo+zZel0c22LSHKyAFS65PnUjHjSz8WV5jp1T4hcr/FgvpHNG I6iA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1787251698; x=1787856498; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=VHzC+rmY032qjqVbZyRDQwA9P9FdJrsCi8GUAUfuieY=; b=DsqKAc2DbImRto3sFYlPc2ZCTN/vjGT4KNw2uyX9JRJX5Lo9WFF97KIoscGT+9FdEn DPXwDA08Opi1ui2rLug50kwBAcgd5uNhW+SVRvFjDY0RRtNEN6EG5e/TCO+H2QVz0LXz lMTkULSg7bunFQT5qWRwM0HA4HgJXanZpJT5BWX+NefayGSN3wNSpHXNZY9PXQ6goqgV gNg6PP0YBpwVqLqVUr6U6tG0W3S6h9WwgRyWOv8ARiBseQwRdCS5eNHf8G/dmV8gpQjd dsVj06Fi2FNy4vsEa/crZ5MiUPNq8l0cu76IlD9rLPLu+MqQq8daP2f0QLFUTOxV1Bh1 EnyQ== X-Forwarded-Encrypted: i=1; AHgh+RrKYMWyW2OA90orxOTSNmnaZZOnBiMQyM1+UqAOpLWASwRTHvhCOuikaRPyjHctWOB/9omwShn+aSqB1PM=@vger.kernel.org X-Gm-Message-State: AFuF++nJajr8atpxZDGbV+W/7sFyZaOmEG9r8pLTdEIz80ORyeYQfPZt jiK4nZZ1bIzHb2YUc/Q20K2UXHEkiCqumQCmFwa8ksrJcVuxFzKSgh0M X-Gm-Gg: AR+sD111I0I2E3lMroR04U+E1shnKYUdCZs1ZsE6J5Kt02DC/B820OQzdX2vCvgO3hU 5W/LEpsiyuRDx2zQsSPzNPKI9MyMpoPuwILTWNypqxe01LRmIkXYJqojoUo5pSj6qYUAz0xsM/e 1kNoLEZ2BWnmaaLLEFmAsVhHS0eqxBtt1vFivx9Zd312vm2wLv467iipRKT3QHtzTVML7HKRrW5 AOvWj7aj8RPimGU0Kqs1ojAsT3p9NPtlLiM8wx0pL/zO7aB2fEuaDxV04khAqHHtbAuuFj8j3dy kLDcZNY0jCOmMR487LQ9J2RkVI9an1nx+lKKkuChfCgyTjbQpFxzKiy3fkJR8TNEzMLwEcGJGJ8 I5Zrl3CyuYQh3P21dbifldToKZO7i1N728LZJLq/yvVe+xlFtqaz3FBFqQB1JRbGpXymZj5wp4/ AlRTgQzaLmS+rUkcNubFvRR6Pj37YGzbJs+mWPJUY8tLEmgFHuC5bMeEhv/q19eWvoGAs= X-Received: by 2002:a05:6000:22c6:b0:481:5021:33cd with SMTP id ffacd0b85a97d-482c0b5482cmr1235545f8f.3.1787251698182; Thu, 20 Aug 2026 11:48:18 -0700 (PDT) Received: from localhost ([2c0f:3d00:6be:8900:ce5e:9212:ea4b:f30]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-482b14d05a6sm15912182f8f.35.2026.08.20.11.48.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Aug 2026 11:48:17 -0700 (PDT) Date: Thu, 20 Aug 2026 21:48:13 +0300 From: Dan Carpenter To: Orgad Shaneh Cc: gregkh@linuxfoundation.org, linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] staging: octeon: schedule the TX cleanup tasklet every 1024th packet Message-ID: References: <20260820113239.8169-1-orgads@gmail.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: <20260820113239.8169-1-orgads@gmail.com> On Thu, Aug 20, 2026 at 02:32:39PM +0300, Orgad Shaneh wrote: > cvm_oct_xmit() means to schedule the cleanup tasklet once every 1024 > packets, as its comment says, to cover the pathological case of heavy > traffic on one port delaying the cleanup of another port blocked > waiting for it. > > The test is inverted: total_to_clean & 0x3ff is true for 1023 of every > 1024 values, and false only on the multiples of 1024. So the tasklet is > scheduled on nearly every packet, and skipped on exactly the packet the > comment wants. That costs one TASKLET softirq per transmitted packet, > each walking every port and doing an FAU fetch-and-add per non-empty > queue, and it buys nothing for this port, which already frees its > completed skbs inline from the skb_to_free value it reads out of the > FAU. > > Test the mask against zero. On a CN50XX board (2 cores at 300MHz) > carrying ~6.9k transmitted packets/s, TASKLET softirqs drop from 7133/s > to 597/s with no throughput change; the freeing work is conserved, so > this removes softirq entries, not work. > > Fixes: 4898c560103f ("Staging: Octeon: Free transmit SKBs in a timely manner") > Signed-off-by: Orgad Shaneh > --- Reviewed-by: Dan Carpenter regards, dan carpenter