From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kernel test robot <xiaolong.ye@intel.com>,
Ingo Molnar <mingo@kernel.org>, Juergen Gross <jgross@suse.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>,
Andrew Cooper <andrew.cooper3@citrix.com>,
Andy Lutomirski <luto@amacapital.net>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Jork Loeser <Jork.Loeser@microsoft.com>,
KY Srinivasan <kys@microsoft.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Steven Rostedt <rostedt@goodmis.org>,
Thomas Gleixner <tglx@linutronix.de>,
LKML <linux-kernel@vger.kernel.org>,
lkp@01.org
Subject: Re: [lkp-robot] [x86/mm] 9e52fc2b50: will-it-scale.per_thread_ops -16% regression
Date: Fri, 29 Sep 2017 16:02:27 +0200 [thread overview]
Message-ID: <874lrlzjpo.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20170929131609.i5t46af7nkjwekbk@hirez.programming.kicks-ass.net> (Peter Zijlstra's message of "Fri, 29 Sep 2017 15:16:09 +0200")
Peter Zijlstra <peterz@infradead.org> writes:
> On Fri, Sep 29, 2017 at 03:13:29PM +0200, Peter Zijlstra wrote:
>> On Fri, Sep 29, 2017 at 02:24:03PM +0200, Vitaly Kuznetsov wrote:
>> > 1) In case the system is under extreme memory pressure and
>> > __get_free_page() is failing in tlb_remove_table() we'll be doing
>> > smp_call_function() for _each_ call (avoiding batching). We may want to
>> > have a pre-allocated pool.
>>
>> MMU_GATHER_BUNDLE should avoid it being for _every_ call.
>
> My bad, that's only for pages, not tables :/
>
>> Also, note that tlb_gather is preemptible, so pre-alloc is 'difficult'
>> and you will run out, esp. when memory is right.
>>
(purely teoretical thought) what I meant to say is in tlb_remove_table()
we may try to get new batch from some pre-allocated (on boot) pool and
revert to __get_free_page() when it's empty. This may make sense
combined with the next idea, allocating more than 1 page.
>> > 2) The default MAX_TABLE_BATCH is static (it is equal to the number of
>> > pointer we can fit into one page - sizeof(struct mmu_table_batch) ==
>> > 509), we may want to adjust it for very big systems.
>>
>> That would then put more stress on the memory allocator because you're
>> then asking for higher order pages.
Of course, but the question is: what's cheaper -- try to alloc e.g. 8
pages or do 8 smp_call_function() calls?
But adding such complexity to the code would require a good
justification, of course.
--
Vitaly
next prev parent reply other threads:[~2017-09-29 14:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 5:59 [lkp-robot] [x86/mm] 9e52fc2b50: will-it-scale.per_thread_ops -16% regression kernel test robot
2017-09-29 12:24 ` Vitaly Kuznetsov
2017-09-29 13:13 ` Peter Zijlstra
2017-09-29 13:16 ` Peter Zijlstra
2017-09-29 14:02 ` Vitaly Kuznetsov [this message]
2017-11-20 16:58 ` Vitaly Kuznetsov
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=874lrlzjpo.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=Jork.Loeser@microsoft.com \
--cc=andrew.cooper3@citrix.com \
--cc=boris.ostrovsky@oracle.com \
--cc=jgross@suse.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=kys@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@01.org \
--cc=luto@amacapital.net \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=sthemmin@microsoft.com \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=xiaolong.ye@intel.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