linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Andy Lutomirski <luto@amacapital.net>
To: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: mmap_sem contention issues
Date: Mon, 26 Nov 2012 12:12:16 -0800	[thread overview]
Message-ID: <CALCETrW=0gQMBW=nLKCWS-O7H5q6zYFCbFGOcC2PTS668=Z_NA@mail.gmail.com> (raw)

I'm having serious latency problems due to mmap_sem contention.  I
have a real-time thread that has (soft) page faults on locked pages,
and it blocks for multiple milliseconds on
(call_rwsem_down_read_failed do_page_fault page_fault).  Can this be
fixed?

Some ideas:

1. Drop mmap_sem during the filesystem part of mmap and munmap.
(MAP_POPULATE in particular is a disaster -- using it will easily
increase latency from a few milliseconds to a respectable fraction of
a second.)

2. Come up with some way to lock specific vm_area_structs for read
access without taking mmap_sem at all.  This looks unpleasant with the
current rbtree structure -- something like a radix tree might work
much better if the nodes were to contain their own locks.

--Andy

-- 
Andy Lutomirski
AMA Capital Management, LLC

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

                 reply	other threads:[~2012-11-26 20:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CALCETrW=0gQMBW=nLKCWS-O7H5q6zYFCbFGOcC2PTS668=Z_NA@mail.gmail.com' \
    --to=luto@amacapital.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.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