[Top] [All Lists]

Re: [PATCH 4/4] mm: numa: Slow PTE scan rate if migration failures occur

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 4/4] mm: numa: Slow PTE scan rate if migration failures occur
From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Mar 2015 16:05:46 -0700
Cc: Mel Gorman <mgorman@xxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Aneesh Kumar <aneesh.kumar@xxxxxxxxxxxxxxxxxx>, Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>, Linux-MM <linux-mm@xxxxxxxxx>, xfs@xxxxxxxxxxx, ppc-dev <linuxppc-dev@xxxxxxxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=eRy7cG+0YTfwiWGI177Kb1y8QXHzGRRbOY9U1FtIooQ=; b=LK2O0L10GrvS0P2LL/SASU+UazCRxlrSY5EeF7hvLIngpswkmAmC+puvna4EYS3kP2 qFD4CL8QSvStCYe2FS1vI4tj1J26952niZ9mFfa45av5gKVytppzCeKB1FY/nxZTDdEf B20arIv1F/3HeLplu93gAtYI2jQyjF6R+ryXChlJZT7JZ5CKIts/GkyZaLFBk0kKjXTn bQxXOYWff2p8G5vu/kKUFnwINAjAqZ4QdelhxMp0FqNz1YbRgA+PvMmE9o5MQ/CFwcwo Am0XExc2kastmKH+NXHkB5MThO281ieBGtLFL3K3z0fCGifThYjamjGB9hSRx80BD091 anMw==
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=eRy7cG+0YTfwiWGI177Kb1y8QXHzGRRbOY9U1FtIooQ=; b=f2zHdj6vxJffvk1A0Llfo8KUObdhY0v8d1ppBPnFNrHnG7joyY9WMFOsqw2q7cBTzK EdRvINyVGgGd3uxG1YXT49ZSgv9n7uvAFUH8qkFiboC/WFZlvArKnLS62ub9iH6++LvL 8pakE4D84dxTUY958FxNZPtfsf4Hv3gti6hcg=
In-reply-to: <20150319224143.GI10105@dastard>
References: <CA+55aFx=81BGnQFNhnAGu6CetL7yifPsnD-+v7Y6QRqwgH47gQ@xxxxxxxxxxxxxx> <20150312184925.GH3406@xxxxxxx> <20150317070655.GB10105@dastard> <CA+55aFzdLnFdku-gnm3mGbeS=QauYBNkFQKYXJAGkrMd2jKXhw@xxxxxxxxxxxxxx> <20150317205104.GA28621@dastard> <CA+55aFzSPcNgxw4GC7aAV1r0P5LniyVVC66COz=3cgMcx73Nag@xxxxxxxxxxxxxx> <20150317220840.GC28621@dastard> <CA+55aFwne-fe_Gg-_GTUo+iOAbbNpLBa264JqSFkH79EULyAqw@xxxxxxxxxxxxxx> <CA+55aFy-Mw74rAdLMMMUgnsG3ZttMWVNGz7CXZJY7q9fqyRYfg@xxxxxxxxxxxxxx> <CA+55aFyxA9u2cVzV+S7TSY9ZvRXCX=z22YAbi9mdPVBKmqgR5g@xxxxxxxxxxxxxx> <20150319224143.GI10105@dastard>
Sender: linus971@xxxxxxxxx
On Thu, Mar 19, 2015 at 3:41 PM, Dave Chinner <david@xxxxxxxxxxxxx> wrote:
> My recollection wasn't faulty - I pulled it from an earlier email.
> That said, the original measurement might have been faulty. I ran
> the numbers again on the 3.19 kernel I saved away from the original
> testing. That came up at 235k, which is pretty much the same as
> yesterday's test. The runtime,however, is unchanged from my original
> measurements of 4m54s (pte_hack came in at 5m20s).

Ok. Good. So the "more than an order of magnitude difference" was
really about measurement differences, not quite as real. Looks like
more a "factor of two" than a factor of 20.

Did you do the profiles the same way? Because that would explain the
differences in the TLB flush percentages too (the "1.4% from
tlb_invalidate_range()" vs "pretty much everything from migration").

The runtime variation does show that there's some *big* subtle
difference for the numa balancing in the exact TNF_NO_GROUP details.
It must be *very* unstable for it to make that big of a difference.
But I feel at least a *bit* better about "unstable algorithm changes a
small varioation into a factor-of-two" vs that crazy factor-of-20.

Can you try Mel's change to make it use

        if (!(vma->vm_flags & VM_WRITE))

instead of the pte details? Again, on otherwise plain 3.19, just so
that we have a baseline. I'd be *so* much happer with checking the vma
details over per-pte details, especially ones that change over the
lifetime of the pte entry, and the NUMA code explicitly mucks with.


<Prev in Thread] Current Thread [Next in Thread>