From: Christoph Hellwig <hch@infradead.org>
To: Xavier Roche <roche+kml2@exalead.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [XFS] Kernel (2.6.11) deadlock (kernel hang) in user mode when writing data through mmap on large files (64-bit systems)
Date: Mon, 16 May 2005 10:40:51 +0100 [thread overview]
Message-ID: <20050516094051.GA20828@infradead.org> (raw)
In-Reply-To: <42831F85.1000208@exalead.com>
On Thu, May 12, 2005 at 11:19:01AM +0200, Xavier Roche wrote:
> It seems that the file was really *badly* fragmented. The reason, as far
> as we understand the problem, was:
>
> - a file "truncated" to _expand_ its size (using ftruncate() with a size
> MUCH larger that the current size, which is == 0), leading to create a
> "big sparse file" area
> - sequential write in this file (_NOT_ random) using the corresponding
> mmapp'ed data segment
> - random (!) flush from kswapd leading to allocate fragmented pages
> (sparse file)
..
> >You're seeing allocation errors where we are trying to realloc that memory
> >block.
> >Could you try the patches that Nikita posted to -mm that should improve
> >this behaviour?
>
> Well, the reasons seems to clearly be this anormal number fo fragments -
> is there any potential solution (in the kernel/mm), or the olny solution
> is a patch to ensure that ftruncate() is replaced by regulars
> fwrite()-zero calls ?
>
Yes. Currently the kernel is doing very badly about clustering these
kinds of allocations. Can you test whether the patches at:
http://marc.theaimsgroup.com/?l=linux-mm&m=111375946911468&w=2
http://marc.theaimsgroup.com/?l=linux-mm&m=111375947014227&w=2
http://marc.theaimsgroup.com/?l=linux-mm&m=111375947006819&w=2
http://marc.theaimsgroup.com/?l=linux-mm&m=111375947029723&w=2
http://marc.theaimsgroup.com/?l=linux-mm&m=111375947010814&w=2
http://marc.theaimsgroup.com/?l=linux-mm&m=111375990000352&w=2
http://marc.theaimsgroup.com/?l=linux-mm&m=111375990030384&w=2
http://marc.theaimsgroup.com/?l=linux-mm&m=111375990032680&w=2
http://marc.theaimsgroup.com/?l=linux-mm&m=111375990019453&w=2
make any difference to you?
prev parent reply other threads:[~2005-05-16 9:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-09 13:18 Kernel (2.6.11) deadlock in user mode when writing data through mmap on large files (64-bit systems, xfs or ext3) Xavier Roche
2005-05-10 15:26 ` [XFS] Kernel (2.6.11) deadlock in user mode when writing data through mmap on large files (64-bit systems) Xavier Roche
2005-05-10 17:01 ` Christoph Hellwig
2005-05-12 9:19 ` [XFS] Kernel (2.6.11) deadlock (kernel hang) " Xavier Roche
2005-05-16 9:40 ` Christoph Hellwig [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=20050516094051.GA20828@infradead.org \
--to=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=roche+kml2@exalead.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;
as well as URLs for NNTP newsgroup(s).