From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754908AbcCJS17 (ORCPT ); Thu, 10 Mar 2016 13:27:59 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33598 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753973AbcCJS1t (ORCPT ); Thu, 10 Mar 2016 13:27:49 -0500 MIME-Version: 1.0 In-Reply-To: <20160310.124450.278421705870462421.davem@davemloft.net> References: <20160307.120410.1851177945150642006.davem@davemloft.net> <20160310.124450.278421705870462421.davem@davemloft.net> Date: Thu, 10 Mar 2016 23:57:48 +0530 Message-ID: Subject: Re: [PATCH 1/2] net: thunderx: Set recevie buffer page usage count in bulk From: Sunil Kovvuri To: David Miller Cc: Linux Netdev List , LKML , LAKML , Sunil Goutham , Robert Richter Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > So calculate the modulus on the page split count and optimize the > increment ahead of time when possible, and for the sub page split > pieces do it one at a time. > Patch does almost the same with a negligible overhead of a counter for page->_count increment at a later time but still before HW starts using buffers. Difference between NIU driver and this patch is there it's calculate split count, increment page count and then divide page into buffers. Here it's divide page into buffers, have a counter which increments at every split and then at the end do a atomic increment of page->_count. Any issue with this approach ? Thanks, Sunil.