xfs
[Top] [All Lists]

[PATCH] vfs: reduce stack usage in write_cache_pages()

To: David Chinner <dgc@xxxxxxx>, Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Subject: [PATCH] vfs: reduce stack usage in write_cache_pages()
From: Denys Vlasenko <vda.linux@xxxxxxxxxxxxxx>
Date: Sun, 27 Apr 2008 04:24:10 +0200
Cc: xfs@xxxxxxxxxxx, Eric Sandeen <sandeen@xxxxxxxxxxx>, Adrian Bunk <bunk@xxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date:user-agent:cc:mime-version:content-type:message-id; bh=0Pp2WvA1VnnFqmR3s4EVYkEp20hQukdb0wvGHOJvmgI=; b=g110PrZhJQ8TLx3cCa7SCO+GxmzIFGiuY4GdyEuqyTETtrcL8vTzQzgWBsHuQfot8RhH2hO3QUdTK2S+XXTpSeuP0pMJ8dXEe/V4qv997X4oZSzxgTEwXCO80k0Dz/JG/zZZDQJ1QY1o+bk684hGzb4L9L932APExISgT+e/FGw=
Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:cc:mime-version:content-type:message-id; b=J9KJAF9cUpV0bq4SWHQ+784qMU7ENRG3rVh305K39XJFylzUX8XMxVDtKcSmKNRHB4WEgGfd7nPw7IT++Pm4NOOvx4D9/1UeFWNPxjFp5o/BSWlNBrUXuzowqqdSXV38IfJ3RiHqa7nJW40YludSbs+uiLaZb2sBp4/qp8nhwLQ=
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: KMail/1.8.2
Hi Al, David,

vfs function write_cache_pages() appears on the xfs
writeout path. It's *the* path which causes 4k stack
overflows on i386 with xfs.

This function uses ~100 bytes of stack on 32-bit i386.

This patch transforms it a little so that it uses
a bit less stack - minus 8 bytes to be precise.

This isn't much, but it helps not only xfs,
but all filesystems.

Only compile tested.

Signed-off-by: Denys Vlasenko <vda.linux@xxxxxxxxxxxxxx>
--
vda

Attachment: stk3.diff
Description: Text Data

<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] vfs: reduce stack usage in write_cache_pages(), Denys Vlasenko <=