All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arkaprava Basu <arkaprava.basu@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: TLB flush question (x86_64)
Date: Sat, 3 Sep 2011 00:47:48 -0500	[thread overview]
Message-ID: <CAErB21iHz_ToVzfU8aPkY8OW5iMOTPgPMdQBsmxo=5YUCMb6Aw@mail.gmail.com> (raw)

Hello,

     I am using 2.6.31 kernel on x86_64 (with SMP configuration). I
have a confusion on a TLB flush function.
     I found that the method tlb_flush_mmu (include/asm-generic/tlb.h)
, which is called by many system calls like munmap,madvise,mprotect
etc; ignores the virtual address range (start and end parameters) for
which it is called. It internally calls tlb_flush method, which on x86
gets converted to flush_tlb_mm. It seems that flush_tlb_mm flushes out
all the mappings for a given mm_struct (i.e., the whole user address
space for a process) from the tlb. Is there any particular reason why
the entire address space is flushed from the tlb while only a range of
virtual address space was supposedly required to be flushed? For
example why the method flush_tlb_range , which would have flushed
mappings belonging to a given virtual address range only could not
have been used instead of flush_tlb_mm? Is there any performance or
some other correctness related concern for not doing that?

Thanks
Arka

             reply	other threads:[~2011-09-03  5:47 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-03  5:47 Arkaprava Basu [this message]
2011-09-17 19:12 ` TLB flush question (x86_64) Andreas Mohr
2011-09-17 23:37   ` Brian Gerst
2011-09-18  9:35     ` Borislav Petkov

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='CAErB21iHz_ToVzfU8aPkY8OW5iMOTPgPMdQBsmxo=5YUCMb6Aw@mail.gmail.com' \
    --to=arkaprava.basu@gmail.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.