public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Michael Clark <michael@metaparadigm.com>
To: "Jörn Engel" <joern@wohnheim.fh-wedel.de>, linux-kernel@vger.kernel.org
Subject: Re: [STACK] >3k call path in ide
Date: Wed, 09 Jun 2004 23:23:20 +0800	[thread overview]
Message-ID: <40C72B68.1030404@metaparadigm.com> (raw)
In-Reply-To: <20040609122921.GG21168@wohnheim.fh-wedel.de>

Hi Jorn,

Noticed that try_to_free_pages, sync_inodes_sb and wakeup_bdflush features
in almost all of these traces and although at 284, 308 and 256 respectively
their not huge but together their neither that small (considering they
occur all in the same stack trace).

This is consumed mostly by a struct page_state which is 148 bytes big
although looking at the code get_page_state(struct page_state *ret)
only populates the first 6 fields or 24 bytes. get_full_page_state
which is hardly used updates these other fields.

Is this a candidate for splitting into 2 structs? 1 containing just the
first 6 fields needed by the majority of users: try_to_free_pages,
shrink_all_memory, kswapd, get_dirty_limits, wakeup_bdflush, sync_inodes_sb

mclark@monty:/usr/src/linux$ find . -name '*.c' | xargs grep get_page_state
./fs/proc/proc_misc.c:  get_page_state(&ps);
./fs/fs-writeback.c:    get_page_state(&ps);
./mm/page_alloc.c:void __get_page_state(struct page_state *ret, int nr)
./mm/page_alloc.c:void get_page_state(struct page_state *ret)
./mm/page_alloc.c:      __get_page_state(ret, nr + 1);
./mm/page_alloc.c:      __get_page_state(ret, sizeof(*ret) / sizeof(unsigned long));
./mm/page_alloc.c:      get_page_state(&ps);
./mm/vmscan.c:          get_page_state(&ps);
./mm/vmscan.c:          get_page_state(&ps);
./mm/vmscan.c:          get_page_state(&ps);
./mm/page-writeback.c:  get_page_state(ps);
./mm/page-writeback.c: * On really big machines, get_page_state is expensive, so try to avoid calling
./mm/page-writeback.c:          get_page_state(&ps);
./mm/page-writeback.c:  get_page_state(&ps);
./mm/page-writeback.c: * If it is too low then SMP machines will call the (expensive) get_page_state

mclark@monty:/usr/src/linux$ find . -name '*.c' | xargs grep get_full_page_state
./drivers/parisc/led.c: get_full_page_state(&pgstat); /* get no of sectors in & out */
./arch/s390/appldata/appldata_base.c:void get_full_page_state(struct page_state *ps)
./arch/s390/appldata/appldata_base.c:EXPORT_SYMBOL_GPL(get_full_page_state);
./arch/s390/appldata/appldata_mem.c:    get_full_page_state(&ps);
./mm/page_alloc.c:void get_full_page_state(struct page_state *ret)
./mm/page_alloc.c:      get_full_page_state(ps);

~mc

On 06/09/04 20:29, Jörn Engel wrote:
> Bartlomiej, can you put ide_config on a diet?
> 
> stackframes for call path too long (3052):
>     size  function
>        0  client_reg_t->event_handler
>     1168  ide_config
>       12  ide_register_hw
>       44  ide_unregister
>       12  ide_unregister_subdriver
>        0  pnpide_init
>        0  pnp_register_driver
>        0  driver_register
>       20  bus_add_driver
>       16  driver_attach
>       72  tty_register_device
>        0  class_simple_device_add
>        0  class_device_register
>       16  class_device_add
>        0  kobject_add
>        0  kobject_hotplug
>      132  call_usermodehelper
>       80  wait_for_completion
>       84  schedule
>       16  __put_task_struct
>       20  audit_free
>       36  audit_log_start
>       16  __kmalloc
>        0  __get_free_pages
>       28  __alloc_pages
>      284  try_to_free_pages
>        0  out_of_memory
>        0  mmput
>       16  exit_aio
>        0  __put_ioctx
>       16  do_munmap
>        0  split_vma
>       36  vma_adjust
>        0  fput
>        0  __fput
>        0  locks_remove_flock
>       12  panic
>        0  sys_sync
>        0  sync_inodes
>      308  sync_inodes_sb
>        0  do_writepages
>      128  mpage_writepages
>        4  write_boundary_block
>        0  ll_rw_block
>       28  submit_bh
>        0  bio_alloc
>       88  mempool_alloc
>      256  wakeup_bdflush
>       20  pdflush_operation
>        0  printk
>        0  preempt_schedule
>       84  schedule
> 
> Jörn
> 

-- 
Michael Clark,  . . . . . . . . . . . .  michael@metaparadigm.com
Managing Director,  . . . . . . . . . http://www.metaparadigm.com
Metaparadigm Pte. Ltd.  . . . . . . . . . .  phone: +65 6395 6277
25F Paterson Road,  . . . . . . . . . . . . mobile: +65 9645 9612
Singapore 238515  . . . . . . . . . . . . . .  fax: +65 6234 4043

  reply	other threads:[~2004-06-09 15:23 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-09 12:29 [STACK] >3k call path in ide Jörn Engel
2004-06-09 15:23 ` Michael Clark [this message]
2004-06-09 16:29   ` Jörn Engel
2004-06-09 19:27     ` Andrew Morton
2004-06-10 22:59       ` Jörn Engel
2004-06-10 23:10         ` Andrew Morton
2004-06-11 10:53           ` Jörn Engel
2004-10-15  1:58           ` Rusty Russell
2004-06-15 23:34 ` [PATCH] " Randy.Dunlap
2004-06-16  7:11   ` Florian Schirmer
2004-06-16  9:47     ` Jörn Engel
2004-06-16  9:55       ` Florian Schirmer
2004-06-16 10:00         ` Jörn Engel
2004-06-16 17:37           ` [PATCH] [STACK] reduce " Randy.Dunlap
2004-06-16 17:57             ` Jörn Engel
2004-06-16 18:16               ` Randy.Dunlap
2004-06-16 18:29                 ` Jörn Engel
2004-06-16 18:49                   ` Randy.Dunlap
2004-06-16 18:58             ` Brian Gerst
2004-06-16 19:52               ` Randy.Dunlap
2004-06-16 22:53                 ` Randy.Dunlap

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40C72B68.1030404@metaparadigm.com \
    --to=michael@metaparadigm.com \
    --cc=joern@wohnheim.fh-wedel.de \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox