xfs
[Top] [All Lists]

Re: XFS stack overflow

To: Sebastian Kun <seb@xxxxxxxxxxxxx>
Subject: Re: XFS stack overflow
From: Stephen Lord <lord@xxxxxxx>
Date: Thu, 23 May 2002 10:20:17 -0500
Cc: linux-xfs@xxxxxxxxxxx, James A Goodwin <jagoodwi@xxxxxxxxxx>, Steve Cooper <scoop@xxxxxxxxxxxxx>
References: <0e6d01c2026b$8f2be510$4902a8c0@xxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.7) Gecko/20011226
Sebastian Kun wrote:

Hello,

There are several routines in XFS that use up an inordinately large amount
of the 6KB per-process stack (6496 bytes with the kernel we're using).  The
worst offender is xfs_dir2_sf_to_block, which puts a 2KB char array right on
the stack.  This has contributed to stack overflows during heavy writing.
The attached patch changes this routine so that it kmallocs the structure
instead.

I've seen this problem with both XFS 1.1, and the XFS-2.4.18 patch located
on the FTP site.  I looked at the web CVS tree today, and it also has this
potential for overflow.

System specs:

2x1.26GHz P3-T, Intel SDS2, 3GB RAM, 1TB RAID5 array
Kernel version: 2.4.18 with SMP, 4GB Highmem with 2GB/2GB split, KDB, and
frame pointers
   + Neil Brown's Bd-nfsall NFS server patch and Trond's nfs_all client
patch (minus TCP server code)
XFS patch: xfs-1.1 (XFS_FS=y, XFS_RT not set, XFS_QUOTA=y, XFS_DMAPI=y)
mkfs: -f -d sunit=128,swidth=1664 -l size=32768b
mount: defaults,noatime,sunit=128,swidth=1664,logbufs=8


Sebastian Kun
Driver developer, Consensys RAIDZONE

Interesting, I was not aware that was on the stack. yes it is being a bit greedy there.

Two things, your attachment did not make it here, and once you do mkfs with
stripe options, you do not need to specify them on mount, it gets them from the
super block. The mount options are intended for changing the stripe layout
from the mkfs specificed values.

Steve




<Prev in Thread] Current Thread [Next in Thread>