From: Andrea Arcangeli <andrea@suse.de>
To: Hugh Dickins <hugh@veritas.com>
Cc: "Martin J. Bligh" <mbligh@aracnet.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] anobjrmap 1/6 objrmap
Date: Sat, 20 Mar 2004 13:46:39 +0100 [thread overview]
Message-ID: <20040320124639.GF9009@dualathlon.random> (raw)
In-Reply-To: <Pine.LNX.4.44.0403190642450.17899-100000@localhost.localdomain>
On Fri, Mar 19, 2004 at 07:08:26AM +0000, Hugh Dickins wrote:
> On Fri, 19 Mar 2004, Andrea Arcangeli wrote:
> > On Thu, Mar 18, 2004 at 11:21:07PM +0000, Hugh Dickins wrote:
> > > + if (!spin_trylock(&mm->page_table_lock))
> > > + return 1;
> > > +
> > [..]
> > > + if (down_trylock(&mapping->i_shared_sem))
> > > + return 1;
> > > +
> >
> > those two will hang your kernel in the workload I posted to the list a
> > few days ago.
>
> I missed the actual workload, will search the archives later.
> Fear I won't reproduce it exactly, and more anxious to plug
> the mremap-move and non-linear holes.
>
> > With previous kernels the above didn't matter, but starting with
> > 2.6.5-rc1 it does matter, if we cannot know if it's referenced or not,
> > we must assume it's not and return 0 or it lives locks hard with all
> > tasks stuck and one must click reboot.
>
> I don't much care whether we return 1 or 0 in that case, be happy to
> make the change if we understand _why_ it's suddenly become necessary.
> I don't remember seeing an explanation from you (and fair enough, you
> didn't want to get stuck on that detail) or anyone else.
it's the changes in the 2.6.5-rc1 page_referenced usage that requires us
to return 0, Andrew may want to elaborate those details.
if you don't fix it your set of patches will hang the box hard if you
hit swap with shared memory swap load.
> > I recommend you to share my objrmap patch, the objrmap should be exactly
> > the same for both of us.
>
> I can't take its mm/mmap.c (and if Martin keeps that page_table_lock
> avoidance in his tree, then I think he shouldn't have followed your
> advice to skip Dave's mmap_sem in unuse_process). But of course,
> I could have started from exactly yours and then a patch to change
> those back. Just so long as we're aware they're not identical.
>
> Hmm, where's page_test_and_clear_dirty gone in your final objrmap.c?
There's no such thing in Dave's objrmap patch.
>
> There's a lot that could be shared between the two approaches.
> Nice if we kept to the same struct page layout: I put int mapcount
> after atomic_t count because almost all arches have atomic_t as an
> int, so won't that placing save us 4 bytes on the 64-bit arches?
my mapcount is an unsigned long, so it doesn't matter, but I think I can
make it an unsigned int, that sounds a good idea since I doubt anybody
will ever fork >4G processes with 2.6. Only after making it an unsigned
it it will matter to position it near the atomic_t on 64bit.
next prev parent reply other threads:[~2004-03-20 12:45 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-18 23:21 Hugh Dickins
2004-03-18 23:22 ` [PATCH] anobjrmap 2/6 linux/rmap.h Hugh Dickins
2004-03-18 23:23 ` [PATCH] anobjrmap 3/6 page->mapping Hugh Dickins
2004-03-18 23:25 ` [PATCH] anobjrmap 4/6 no pte_chains Hugh Dickins
2004-03-18 23:26 ` [PATCH] anobjrmap 5/6 anonmm Hugh Dickins
2004-03-19 16:15 ` Rik van Riel
2004-03-18 23:27 ` [PATCH] anobjrmap 6/6 cleanup Hugh Dickins
2004-03-19 2:42 ` [PATCH] anobjrmap 1/6 objrmap Andrea Arcangeli
2004-03-19 7:08 ` Hugh Dickins
2004-03-19 17:11 ` Martin J. Bligh
2004-03-20 12:30 ` Andrea Arcangeli
2004-03-20 14:03 ` William Lee Irwin III
2004-03-20 14:29 ` Andrea Arcangeli
2004-03-20 15:56 ` Martin J. Bligh
2004-03-20 16:19 ` Andrea Arcangeli
2004-03-20 16:40 ` Martin J. Bligh
2004-03-20 16:55 ` Andrea Arcangeli
2004-03-20 17:33 ` Martin J. Bligh
2004-03-20 18:50 ` Andrea Arcangeli
2004-03-21 16:30 ` Martin J. Bligh
2004-03-21 23:52 ` Andrea Arcangeli
2004-03-22 15:53 ` Martin J. Bligh
2004-03-24 6:19 ` Andrea Arcangeli
2004-03-24 15:56 ` Martin J. Bligh
2004-03-24 16:21 ` Andrea Arcangeli
2004-03-24 16:35 ` Martin J. Bligh
2004-03-24 17:08 ` Andrea Arcangeli
2004-03-24 20:00 ` William Lee Irwin III
2004-03-24 20:01 ` William Lee Irwin III
2004-03-24 20:17 ` William Lee Irwin III
2004-03-20 12:46 ` Andrea Arcangeli [this message]
2004-03-19 14:38 ` William Lee Irwin III
2004-03-22 20:37 ` [PATCH] anobjrmap 7/6 mremap moves Hugh Dickins
2004-03-22 21:52 ` Rajesh Venkatasubramanian
2004-03-26 14:29 ` [PATCH] anobjrmap 8/6 unmap nonlinear Hugh Dickins
2004-03-26 14:54 ` Realtek 8139too drivers Linux Kernel
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=20040320124639.GF9009@dualathlon.random \
--to=andrea@suse.de \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@aracnet.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
Powered by JetHome