linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Minchan Kim <minchan@kernel.org>, Alex Shi <alex.shi@intel.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	devel@driverdev.osuosl.org, Konrad Wilk <konrad.wilk@oracle.com>,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Robert Jennings <rcj@linux.vnet.ibm.com>,
	Nitin Gupta <ngupta@vflare.org>
Subject: Re: [PATCH 3/3] x86: add local_tlb_flush_kernel_range()
Date: Wed, 27 Jun 2012 13:33:40 -0500	[thread overview]
Message-ID: <4FEB5204.3090707@linux.vnet.ibm.com> (raw)
In-Reply-To: <90bcc2c8-bcac-4620-b3c0-6b65f8d9174d@default>

On 06/27/2012 10:12 AM, Dan Magenheimer wrote:
>> From: Minchan Kim [mailto:minchan@kernel.org]
>> Subject: Re: [PATCH 3/3] x86: add local_tlb_flush_kernel_range()
>>
>> On 06/27/2012 03:14 PM, Alex Shi wrote:
>>>
>>> On 06/27/2012 01:53 PM, Minchan Kim wrote:
>>> Different CPU type has different balance point on the invlpg replacing
>>> flush all. and some CPU never get benefit from invlpg, So, it's better
>>> to use different value for different CPU, not a fixed
>>> INVLPG_BREAK_EVEN_PAGES.
>>
>> I think it could be another patch as further step and someone who are
>> very familiar with architecture could do better than.
>> So I hope it could be merged if it doesn't have real big problem.
>>
>> Thanks for the comment, Alex.
> 
> Just my opinion, but I have to agree with Alex.  Hardcoding
> behavior that is VERY processor-specific is a bad idea.  TLBs should
> only be messed with when absolutely necessary, not for the
> convenience of defending an abstraction that is nice-to-have
> but, in current OS kernel code, unnecessary.

I agree that it's not optimal.  The selection based on CPUID
is part of Alex's patchset, and I'll be glad to use that
code when it gets integrated.

But the real discussion is are we going to:
1) wait until Alex's patches to be integrated, degrading
zsmalloc in the meantime or
2) put in some simple temporary logic that works well (not
best) for most cases

> IIUC, zsmalloc only cares that the breakeven point is greater
> than two.  An arch-specific choice of (A) two page flushes
> vs (B) one all-TLB flush should be all that is necessary right
> now.  (And, per separate discussion, even this isn't really
> necessary either.)
> 
> If zsmalloc _ever_ gets extended to support items that might
> span three or more pages, a more generic TLB flush-pages-vs-flush-all
> approach may be warranted and, by then, may already exist in some
> future kernel.  Until then, IMHO, keep it simple.

I guess I'm not following.  Are you supporting the removal
of the "break even" logic?  I added that logic as a
compromise for Peter's feedback:

http://lkml.org/lkml/2012/5/17/177

--
Seth

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  parent reply	other threads:[~2012-06-27 18:35 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 16:14 [PATCH 0/3] zsmalloc: remove x86 dependency Seth Jennings
2012-06-25 16:14 ` [PATCH 1/3] zram/zcache: swtich Kconfig dependency from X86 to ZSMALLOC Seth Jennings
2012-06-27  2:37   ` Minchan Kim
2012-06-27  2:43     ` Greg Kroah-Hartman
2012-06-27  2:49       ` Minchan Kim
2012-06-27  3:21         ` Greg Kroah-Hartman
2012-06-27 15:40           ` Konrad Rzeszutek Wilk
2012-06-27 18:55             ` Greg Kroah-Hartman
2012-06-27 18:52               ` Konrad Rzeszutek Wilk
2012-06-27 19:29                 ` Greg Kroah-Hartman
2012-06-25 16:14 ` [PATCH 2/3] zsmalloc: add generic path and remove x86 dependency Seth Jennings
2012-06-25 16:59   ` Greg Kroah-Hartman
2012-06-25 17:10     ` Seth Jennings
2012-06-25 17:19       ` Greg Kroah-Hartman
2012-06-25 18:24         ` Seth Jennings
2012-06-25 23:37           ` Greg Kroah-Hartman
2012-06-27  5:28   ` Minchan Kim
2012-06-27 19:09     ` Seth Jennings
2012-06-28  0:20       ` Minchan Kim
2012-06-25 16:14 ` [PATCH 3/3] x86: add local_tlb_flush_kernel_range() Seth Jennings
2012-06-25 23:01   ` Konrad Rzeszutek Wilk
2012-06-26 13:39     ` Seth Jennings
2012-06-27  5:53   ` Minchan Kim
2012-06-27  6:14     ` Alex Shi
2012-06-27  6:26       ` Minchan Kim
2012-06-27 15:12         ` Dan Magenheimer
2012-06-27 15:39           ` Konrad Rzeszutek Wilk
2012-06-27 18:35             ` Seth Jennings
2012-06-27 18:33           ` Seth Jennings [this message]
2012-06-27 21:15             ` Dan Magenheimer
2012-06-27 21:41               ` Seth Jennings
2012-06-28  2:03             ` Alex Shi
2012-06-28 15:21               ` Seth Jennings
2012-06-29  0:19                 ` Alex Shi

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=4FEB5204.3090707@linux.vnet.ibm.com \
    --to=sjenning@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=alex.shi@intel.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.wilk@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=rcj@linux.vnet.ibm.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).