Re: [PATCH] xfs: reduce stack usage in xfs_bmap_btalloc()

Previous thread: [git pull] x86 fix by Ingo Molnar on Saturday, April 26, 2008 - 3:47 pm. (2 messages)

Next thread: [PATCH] ide: manage resources for PCI devices in ide_pci_enable() (take 3) by Bartlomiej Zolnierkiewicz on Saturday, April 26, 2008 - 4:18 pm. (1 message)
To: Denys Vlasenko <vda.linux@...>
Cc: David Chinner <dgc@...>, <xfs@...>, Eric Sandeen <sandeen@...>, Adrian Bunk <bunk@...>, <linux-kernel@...>
Date: Saturday, April 26, 2008 - 4:02 pm

You should mark the helper noinline just to prevent gcc from possibly
inlining it. Even if it doesn't with your current compiler inline heuristics
vary widely between compiler versions.

-Andi
--

To: Andi Kleen <andi@...>
Cc: Denys Vlasenko <vda.linux@...>, David Chinner <dgc@...>, <xfs@...>, Eric Sandeen <sandeen@...>, Adrian Bunk <bunk@...>, <linux-kernel@...>
Date: Saturday, April 26, 2008 - 4:07 pm

STATIC as defined by xfs already does this..

--

To: Christoph Hellwig <hch@...>
Cc: Andi Kleen <andi@...>, Denys Vlasenko <vda.linux@...>, David Chinner <dgc@...>, <xfs@...>, Eric Sandeen <sandeen@...>, Adrian Bunk <bunk@...>, <linux-kernel@...>
Date: Saturday, April 26, 2008 - 4:26 pm

Weird. Unexpected. Different from everyone else. Is this some exercise in
obfuscation?

But ok.

-Andi
--

To: Andi Kleen <andi@...>
Cc: Christoph Hellwig <hch@...>, Denys Vlasenko <vda.linux@...>, David Chinner <dgc@...>, <xfs@...>, Eric Sandeen <sandeen@...>, Adrian Bunk <bunk@...>, <linux-kernel@...>
Date: Saturday, April 26, 2008 - 4:23 pm

The whole STATIC thing is weird to start with..

Yes, it's kinda unexpected and at least I don't particularly liked it.
But the inlining of functions with -funit-at-a-time was such a problem
for the stack useage in XFS that it got added as least horrible bandaid.

--

To: Christoph Hellwig <hch@...>
Cc: Andi Kleen <andi@...>, Denys Vlasenko <vda.linux@...>, David Chinner <dgc@...>, <xfs@...>, Eric Sandeen <sandeen@...>, Adrian Bunk <bunk@...>, <linux-kernel@...>
Date: Sunday, April 27, 2008 - 8:06 pm

Having to compile chunks of XFS code in both kernel and
userspace is also wierd (relative to other drivers), and
its a side-effect of needing to do that (all the code
dealing with specifics of ondisk format is shared).

cheers.

--
Nathan

--

To: <nscott@...>
Cc: Christoph Hellwig <hch@...>, Denys Vlasenko <vda.linux@...>, David Chinner <dgc@...>, <xfs@...>, Eric Sandeen <sandeen@...>, Adrian Bunk <bunk@...>, <linux-kernel@...>
Date: Monday, April 28, 2008 - 6:32 am

Perhaps it would be a good idea to mark the files where that is expected

But does that really need "STATIC"? Seems doubtful to me.

-Andi

--

To: Andi Kleen <andi@...>
Cc: Christoph Hellwig <hch@...>, Denys Vlasenko <vda.linux@...>, David Chinner <dgc@...>, <xfs@...>, Eric Sandeen <sandeen@...>, Adrian Bunk <bunk@...>, <linux-kernel@...>
Date: Monday, April 28, 2008 - 7:52 pm

In userspace STATIC is defined to nothing, and the tools
(and/or libxfs) directly call into numerous functions that
are (really) static in the kernel.

cheers.

--
Nathan

--

To: Nathan Scott <nscott@...>
Cc: Christoph Hellwig <hch@...>, Andi Kleen <andi@...>, Denys Vlasenko <vda.linux@...>, David Chinner <dgc@...>, <xfs@...>, Eric Sandeen <sandeen@...>, Adrian Bunk <bunk@...>, <linux-kernel@...>
Date: Monday, April 28, 2008 - 1:56 am

There would be neater ways to deal with that, but then again there
are more urgent things to tackle. And for the time beeing using
STATIC to imply non-inline is actually a very useful hack for XFS.

--

Previous thread: [git pull] x86 fix by Ingo Molnar on Saturday, April 26, 2008 - 3:47 pm. (2 messages)

Next thread: [PATCH] ide: manage resources for PCI devices in ide_pci_enable() (take 3) by Bartlomiej Zolnierkiewicz on Saturday, April 26, 2008 - 4:18 pm. (1 message)