Re: [PATCH] 2.5.21 - list.h cleanup

From: Martin Dalecki (dalecki@evision-ventures.com)
Date: Wed Jun 12 2002 - 02:11:42 EST


Użytkownik Linus Torvalds napisał:
>
> On Wed, 12 Jun 2002, Rusty Russell wrote:
>
>>The only really sane way to implement "CONFIG_SMALL_NO_INLINES" that I
>>can think of is to have headers do
>
>
> inlines, when used properly, are _not_ larger than not inlining.

Actually I have monitored linux/include/linux/*.h for improper
and inadequate inlining. Well what have I to say. In comparision
to the last time I checked (around 4 years ago) the situation
got *much* better. I was not able to save more then around 1k of
code from the kernel... How ever some offenders are:

1. elv_next_request(request_queue_t *q)

- just too big

2. seq_putc(struct seq_file *m, char c)

- just not worth the trobule.

3. seq_puts(struct seq_file *m, const char *s)

- calls strlen and memset - really not worth inlining.

4. void DQUOT_INIT(struct inode *inode)
  void DQUOT_DROP(struct inode *inode)
DQUOT_PREALLOC_SPACE_NODIRTY(struct in
int DQUOT_PREALLOC_SPACE(struct inode *inode, qsize_t nr)ode *inode, qsize_t

and friends from quotaops - all to be to be inlines.

But the situation got really really better over time!
Please note that I didn't look at include/asm/*.h files, where
memset copy_from/to_user strlen and friends reside, which
result in quite a lot of inline code.

-
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/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:24 EST