From: Hugh Dickins <hughd@google.com>
To: Sagar Borikar <sagar.borikar@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: Re: mmap locked doesn't return
Date: Mon, 23 Jan 2012 11:23:59 -0800 (PST) [thread overview]
Message-ID: <alpine.LSU.2.00.1201231110540.1677@eggly.anvils> (raw)
In-Reply-To: <CAFwMWxs7S+6VqA00NFVKum=QHU2266Mj2kXcoHzRfyXU8+dv7A@mail.gmail.com>
On Mon, 23 Jan 2012, Sagar Borikar wrote:
>
> We are observing that mmap when called with MAP_SHARED and MAP_LOCKED
> flags on the disk which has the bad sectors, doesn't return either
> success or failure and gets stuck somewhere in mmap routine. Disk
> replacement is the obvious solution but the question is what makes
> mmap not to return failure?
> Individual mapping works fine i.e. on the same disk at same offset
> when mmap is invoked with MAP_SHARED or MAP_LOCKED the call succeeds
> but when they both are clubbed together, it doesn't return anything.
>
> strace output snippet
>
> open("/dev/dm-4p2", O_RDWR) = 3
> mmap(NULL, 10485760, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED, 3, 0x4000000
>
>
> setup:
>
> 2.6.23 LST kernel
> Westmere platform - 4 socket cpu
> RAM -192GB
2.6.23 is a four-year-old kernel. There have been a lot of changes
since then, in mlocking and all over. Here I suspect a change
in filemap_fault() may be relevant. At the time of 2.6.23, its
page_not_uptodate IO error handling expected an IO error to be
reported by readpage() (which only initiates the read), and looks
in danger of retrying indefinitely. Whereas in the current tree
I see a wait_on_page_locked() followed by EIO if !PageUptodate there.
My guess is a move to a more recent kernel would solve your problem.
Hugh
prev parent reply other threads:[~2012-01-23 19:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-23 15:43 Sagar Borikar
2012-01-23 19:23 ` Hugh Dickins [this message]
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=alpine.LSU.2.00.1201231110540.1677@eggly.anvils \
--to=hughd@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sagar.borikar@gmail.com \
/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
all inboxes | Powered by JetHome®