Re: top stack (l)users for 2.5.69

Randy.Dunlap (rddunlap@osdl.org)
Wed, 7 May 2003 14:27:59 -0700


On Thu, 8 May 2003 00:27:01 +0300 Marcus Alanen <marcus@infa.abo.fi> wrote:

| On Wed, 7 May 2003 13:38:56 -0700, Randy.Dunlap <rddunlap@osdl.org> wrote:
| >I have mostly used kmalloc/kfree, but using automatic variables is certainly
| >cleaner to write (code). One of the patches that I did just made each ioctl
| >cmd call a separate function, and then each separate function was able to use
| >automatic variables on the stack instead of kmalloc/kfree. I prefer this
| >method when it's feasible (and until gcc can handle these cases).
|
| I take it moving the automatic variables in the function to a static
| data area would be possible, _if_ that function (or rather, the
| variables) is protected by some unique lock (not some per-structure
| lock, of course)? Although this is probably already done in the
| majority of cases.

Sure, it just means that use of those areas has to be serialized,
whereas the other ways allow reentrant/concurrent uses.

--
~Randy
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/