Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Carlos O'Donell <carlos@baldric.uwo.ca>
To: Randolph Chung <randolph@tausq.org>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] Improving performance of munmap
Date: Thu, 7 Oct 2004 22:03:43 -0400	[thread overview]
Message-ID: <20041008020343.GN24430@baldric.uwo.ca> (raw)
In-Reply-To: <20041007230232.GF14151@tausq.org>

On Thu, Oct 07, 2004 at 04:02:32PM -0700, Randolph Chung wrote:
> Hi all,
> 
> On a 2.6 SMP kernel, munmap()ing 16MB currently takes on the order of
> 0.8-0.9 seconds on a 440MHz machine. on a UP machine it takes about 5ms.
> 
> profiling shows that we are spending a lot of time flushing caches:
> 
> tausq@ios:~/parisc/linux-2.6$ sort -nr -k3 ~/test/mmap/after |head
>  48586 cpu_idle                                 759.1562
>  37906 machine_restart                          592.2812
>  10951 flush_user_icache_range_asm              304.1944
>  10946 flush_user_dcache_range_asm              304.0556
>    129 flush_kernel_icache_page                   1.2900
>     29 _spin_unlock_bh                            0.6042
>      9 fdsync                                     0.4500
>     10 _spin_unlock_irq                           0.4167
> 
> i believe this is related to the way we implement flush_tlb_mm(). on SMP
> we currently flush the entire tlb, instead of just invaliding the
> process context. this is needed to get the correct behavior if a
> multithreaded app is simultaneously running on >1 CPUs. James had
> suggested previously that we might be able to do something smarter, such
> as sending an ipi to the other CPU to switch the context. 
> 
> would anybody like to look into this problem, or suggest some ways to
> tackle this?

Is munmap() speed really a big issue? Does userland see the benefits of
a faster flush_tlb_mm()?

Perhaps if you call dlclose() *a lot* you might notice.

Or if you create and destroy threads really quickly.

Aside from that, who else in userspace is a big munmap caller?

c.

_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  reply	other threads:[~2004-10-08  2:03 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-07 23:02 [parisc-linux] Improving performance of munmap Randolph Chung
2004-10-08  2:03 ` Carlos O'Donell [this message]
2004-10-08  4:16   ` Randolph Chung
2004-10-08 16:59     ` Randolph Chung
2004-10-08 17:05       ` Randolph Chung
2004-10-08 17:35       ` Grant Grundler

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=20041008020343.GN24430@baldric.uwo.ca \
    --to=carlos@baldric.uwo.ca \
    --cc=parisc-linux@lists.parisc-linux.org \
    --cc=randolph@tausq.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