mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hugh Dickins <hugh@veritas.com>
To: "Martin J. Bligh" <mbligh@aracnet.com>
Cc: Andrew Morton <akpm@digeo.com>, Dave McCracken <dmccr@us.ibm.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] fix obj vma sorting
Date: Wed, 9 Apr 2003 19:24:01 +0100 (BST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0304091900280.2540-100000@localhost.localdomain> (raw)
In-Reply-To: <192640000.1049908071@[10.10.2.4]>

On Wed, 9 Apr 2003, Martin J. Bligh wrote:

> Hmmm. Something somewhere went wrong. Some semaphore blew up
> somewhere ... I'm not convinced that this is your patch
> causing the problem, I just thought that since vma_link seems
> to have gone up rather in the profile. I'm playing with getting
> some better data on what actually happened, but in case someone
> is feeling psychic. 
> 
> The main thing I changed here (66-mjb2 -> 67-mjb0.2) was to pick up 
> Andrew's rmap speedups, and drop the objrmap code I had for the stuff 

I haven't examined it, but I'm guessing 66-mjb2 did not have Dave's
vma sorting in at all?  Its linear search would certainly raise the
time spent in __vma_link (notable in your diffprofile), which would
increase the pressure on i_shared_sem.

(Whether it's a worthwhile optimization remains to be seen: like
rmap generally, it speeds up page_referenced and try_to_unmap at
the expense of the fast path.  One improvement would be for fork
to just slot dst vma in next to src vma instead of linear search.)

I don't think my fix to the sort order could have slowed it down
further (though once there are stray entries out of order, it may
be hard to predict how things will work out).  But without it
page_referenced and try_to_unmap sometimes couldn't quite find
all the mappings they were looking for.

> he had. *However*, what he had worked fine. I also picked up your 
> sorting patch here Hugh ... this bit worries me:
> 
> +static void move_vma_start(struct vm_area_struct *vma, unsigned long addr)

It does use i_shared_sem where it wasn't used before, yes, but it's
only called by one case of vma_merge and one case of split_vma:
unless your tests are doing a lot of vma splitting (e.g. mprotecting
ranges which break up vmas), I wouldn't expect it to figure highly.
I can see it's there in the plus part of your diffprofile, but I'm
too inexperienced at reading these things, without the original
profiles, to tell whether it's being used a surprising amount.

When you say "*However*, what he had worked fine", are you saying
you profiled before adding in my patch on top?  The diffprofile of
the before and after my patch should in that case illuminate.

Hugh


  reply	other threads:[~2003-04-09 18:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08 18:16 Hugh Dickins
2003-04-09 17:07 ` Martin J. Bligh
2003-04-09 18:24   ` Hugh Dickins [this message]
2003-04-09 18:33     ` Martin J. Bligh
2003-04-09 19:20       ` Hugh Dickins
2003-04-09 20:11         ` William Lee Irwin III
2003-04-10 13:52         ` Hugh Dickins
2003-04-10 14:29           ` Martin J. Bligh
2003-04-10 14:39             ` Hugh Dickins
2003-04-10 14:50             ` Dave McCracken
2003-04-10 14:57               ` Martin J. Bligh
2003-04-10 15:21                 ` Hugh Dickins
2003-04-10 15:24                   ` Martin J. Bligh

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=Pine.LNX.4.44.0304091900280.2540-100000@localhost.localdomain \
    --to=hugh@veritas.com \
    --cc=akpm@digeo.com \
    --cc=dmccr@us.ibm.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

all inboxes | Powered by JetHome®