lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080427232317.GB103491721@sgi.com>
Date:	Mon, 28 Apr 2008 09:23:17 +1000
From:	David Chinner <dgc@....com>
To:	Denys Vlasenko <vda.linux@...glemail.com>
Cc:	David Chinner <dgc@....com>, xfs@....sgi.com,
	Eric Sandeen <sandeen@...deen.net>,
	Adrian Bunk <bunk@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] xfs: reduce stack usage in xfs_page_state_convert()

On Sun, Apr 27, 2008 at 02:46:58AM +0200, Denys Vlasenko wrote:
> Hi David,
> 
> This patch reduces xfs_page_state_convert() stack usage by 16 bytes
> by eliminating some local variables, and reducing the size
> of scope for other locals.
> 
> Compile tested only.

Can you start testing your patches? if you are touching the writeback
or allocator path, there's a pretty high barrier to having patches
excepted, and testing them before is one of them. Go and download the
XFSQA suite from the xfs-cmds CVS tree on oss.sgi.com, and run your
patches through it....

> Signed-off-by: Denys Vlasenko <vda.linux@...glemail.com>
> 
> P.S.
> 
> xfs_page_state_convert() carries the following comment:
>  * Calling this without startio set means we are being asked to make a dirty
>  * page ready for freeing it's buffers.  When called with startio set then
>  * we are coming from writepage.
> which leads to the following proposal: reimplement it as two
> functions, one which work as if startio parameter == 0
> and the other as if startio == 1.
> This will result in a bit of code duplication, but reduces
> stack usage on writepage path and allows for these two functions
> to have more descriptive names. (Presently the meaning of this
> function needs to be explained in that comment -> function
> name is not descriptive enough, because it does different things
> depending on startio value).
> 
> Do you like this idea?

No. That code is complex enough with only one copy of it around. I don't
want two copies that differ subtly and hence have two different sets
of nasty, rarely hit corner cases in them.

Cheers,

Dave.
-- 
Dave Chinner
Principal Engineer
SGI Australian Software Group
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ