From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Randy.Dunlap" Subject: Re: [PATCH] pktgen: reduce stack usage Date: Mon, 21 Feb 2005 08:27:20 -0800 Message-ID: <421A0BE8.6050603@osdl.org> References: <20050218134219.3f079110.rddunlap@osdl.org> <4216AAE4.1080804@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: robert.olsson@its.uu.se, netdev To: Ben Greear In-Reply-To: <4216AAE4.1080804@candelatech.com> Sender: netdev-bounce@oss.sgi.com Errors-to: netdev-bounce@oss.sgi.com List-Id: netdev.vger.kernel.org Ben Greear wrote: > Randy.Dunlap wrote: > >> (resend) >> Any comments this time? >> >> pktgen: proc_if_write: reduce stack usage (on i386) >> from 776 to 296 bytes by combining/reusing locals. > > Since these methods are not in the fast path, and the stack > usage is not near 4k, does this really matter? It's not critical or near causing a stack overflow AFAICT. And ideally gcc would recognize this kind of usage and not allocate multiple stack entries for it. syscall: sys_write (tiny stack usage) -> vfs_write (tiny) -> proc_file_write (tiny) -> proc_if_write (pktgen: large) > I'm asking more to be educated than to dismiss the changes.... -- ~Randy