All of lore.kernel.org
 help / color / mirror / Atom feed
From: konrad.wilk@oracle.com (Konrad Rzeszutek Wilk)
To: linux-arm-kernel@lists.infradead.org
Subject: Compilation problem with drivers/staging/zsmalloc when !SMP on ARM
Date: Tue, 22 Jan 2013 15:34:50 -0500	[thread overview]
Message-ID: <20130122203450.GD12371@phenom.dumpdata.com> (raw)
In-Reply-To: <20130121055541.GD3666@blaptop>

> > The initial patch were done on x86. Then Seth did the work to make sure
> > it worked on PPC. Munchin looked on ARM and that is it.
> 
> s/Munchin/Minchan

Thank you. I am sorry for butchering your name.
> 
> > 
> > If you have an ARM server that you would be willing to part with I would
> > be thrilled to look at it.
> > 
> > > 
> > > diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c
> > > b/drivers/staging/zsmalloc/zsmalloc-main.c
> > > index 09a9d35..ecf75fb 100644
> > 	> --- a/drivers/staging/zsmalloc/zsmalloc-main.c
> > > +++ b/drivers/staging/zsmalloc/zsmalloc-main.c
> > > @@ -228,7 +228,7 @@ struct zs_pool {
> > >   * mapping rather than copying
> > >   * for object mapping.
> > >  */
> > > -#if defined(CONFIG_ARM)
> > > +#if defined(CONFIG_ARM) && defined(CONFIG_SMP)
> > >  #define USE_PGTABLE_MAPPING
> 
> I don't get it. How to prevent the problem Russel described?
> The problem is that other CPU can prefetch _speculatively_ under us.

<nods> Not sure either.
> 
> > >  #endif
> > > 
> > > .. such that it even compiles in both "guess" configurations, the
> > > slower Cortex-A8 600MHz single core system gets to use the slow copy
> > > path and the dual-core 1GHz+ Cortex-A9 (with twice the RAM..) gets to
> > > use the fast mapping path. Essentially all the patch does is "improve
> > > performance" on the fastest, best-configured, large-amounts-of-RAM,
> > > lots-of-CPU-performance ARM systems (OMAP4+, Snapdragon, Exynos4+,
> > > marvell armada, i.MX6..) while introducing the problems Russell
> > > describes, and leave performance exactly the same and potentially far
> > > more stable on the slower, memory-limited ARM machines.
> > 
> > Any ideas on how to detect that?
> > > 
> > > Given the purpose of zsmalloc, zram, zcache etc. this somewhat defies
> > > logic. If it's not making the memory-limited, slow ARM systems run
> > > better, what's the point?
> > > 
> > > So in summary I suggest "we" (Greg? or is it Seth's responsibility?)
> > > should just back out that whole USE_PGTABLE_MAPPING chunk of code
> > > introduced with f553646. Then Russell can carry on randconfiging and I
> > > can build for SMP and UP and get the same code.. with less bugs.
> > 
> > I get that you want to have this fixed right now. I think having it
> > fixed the right way is a better choice. Lets discuss that first
> > before we start tossing patches to disable parts of it.
> 
> If I don't miss something, we could have 2 choice.
> 
> 1) use flush_tlb_kernel_range instead of local_flush_tlb_kernel_range
> Or
> 2) use only memory copy
> 
> I guess everybody want 2 because it makes code very simple and maintainable.
> Even, rencently Joonsoo sent optimize patch.
> Look at https://lkml.org/lkml/2013/1/16/68 so zram/zcache effect caused by 2
> would be minimized.
> 
> But please give me the time and I will borrow quad-core embedded target board
> and test 1 on the phone with Seth's benchmark.
> 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo at vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> 
> -- 
> Kind regards,
> Minchan Kim

WARNING: multiple messages have this Message-ID (diff)
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Minchan Kim <minchan@kernel.org>
Cc: Matt Sealey <matt@genesi-usa.com>,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	Linux ARM Kernel ML <linux-arm-kernel@lists.infradead.org>,
	devel <devel@driverdev.osuosl.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Nitin Gupta <ngupta@vflare.org>,
	Seth Jennings <sjenning@linux.vnet.ibm.com>
Subject: Re: Compilation problem with drivers/staging/zsmalloc when !SMP on ARM
Date: Tue, 22 Jan 2013 15:34:50 -0500	[thread overview]
Message-ID: <20130122203450.GD12371@phenom.dumpdata.com> (raw)
In-Reply-To: <20130121055541.GD3666@blaptop>

> > The initial patch were done on x86. Then Seth did the work to make sure
> > it worked on PPC. Munchin looked on ARM and that is it.
> 
> s/Munchin/Minchan

Thank you. I am sorry for butchering your name.
> 
> > 
> > If you have an ARM server that you would be willing to part with I would
> > be thrilled to look at it.
> > 
> > > 
> > > diff --git a/drivers/staging/zsmalloc/zsmalloc-main.c
> > > b/drivers/staging/zsmalloc/zsmalloc-main.c
> > > index 09a9d35..ecf75fb 100644
> > 	> --- a/drivers/staging/zsmalloc/zsmalloc-main.c
> > > +++ b/drivers/staging/zsmalloc/zsmalloc-main.c
> > > @@ -228,7 +228,7 @@ struct zs_pool {
> > >   * mapping rather than copying
> > >   * for object mapping.
> > >  */
> > > -#if defined(CONFIG_ARM)
> > > +#if defined(CONFIG_ARM) && defined(CONFIG_SMP)
> > >  #define USE_PGTABLE_MAPPING
> 
> I don't get it. How to prevent the problem Russel described?
> The problem is that other CPU can prefetch _speculatively_ under us.

<nods> Not sure either.
> 
> > >  #endif
> > > 
> > > .. such that it even compiles in both "guess" configurations, the
> > > slower Cortex-A8 600MHz single core system gets to use the slow copy
> > > path and the dual-core 1GHz+ Cortex-A9 (with twice the RAM..) gets to
> > > use the fast mapping path. Essentially all the patch does is "improve
> > > performance" on the fastest, best-configured, large-amounts-of-RAM,
> > > lots-of-CPU-performance ARM systems (OMAP4+, Snapdragon, Exynos4+,
> > > marvell armada, i.MX6..) while introducing the problems Russell
> > > describes, and leave performance exactly the same and potentially far
> > > more stable on the slower, memory-limited ARM machines.
> > 
> > Any ideas on how to detect that?
> > > 
> > > Given the purpose of zsmalloc, zram, zcache etc. this somewhat defies
> > > logic. If it's not making the memory-limited, slow ARM systems run
> > > better, what's the point?
> > > 
> > > So in summary I suggest "we" (Greg? or is it Seth's responsibility?)
> > > should just back out that whole USE_PGTABLE_MAPPING chunk of code
> > > introduced with f553646. Then Russell can carry on randconfiging and I
> > > can build for SMP and UP and get the same code.. with less bugs.
> > 
> > I get that you want to have this fixed right now. I think having it
> > fixed the right way is a better choice. Lets discuss that first
> > before we start tossing patches to disable parts of it.
> 
> If I don't miss something, we could have 2 choice.
> 
> 1) use flush_tlb_kernel_range instead of local_flush_tlb_kernel_range
> Or
> 2) use only memory copy
> 
> I guess everybody want 2 because it makes code very simple and maintainable.
> Even, rencently Joonsoo sent optimize patch.
> Look at https://lkml.org/lkml/2013/1/16/68 so zram/zcache effect caused by 2
> would be minimized.
> 
> But please give me the time and I will borrow quad-core embedded target board
> and test 1 on the phone with Seth's benchmark.
> 
> > 
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > Please read the FAQ at  http://www.tux.org/lkml/
> 
> -- 
> Kind regards,
> Minchan Kim

  parent reply	other threads:[~2013-01-22 20:34 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-18 20:24 Compilation problem with drivers/staging/zsmalloc when !SMP on ARM Matt Sealey
2013-01-18 20:24 ` Matt Sealey
2013-01-18 21:08 ` Russell King - ARM Linux
2013-01-18 21:08   ` Russell King - ARM Linux
2013-01-18 21:45   ` Greg Kroah-Hartman
2013-01-18 21:45     ` Greg Kroah-Hartman
2013-01-19  4:37     ` Konrad Rzeszutek Wilk
2013-01-19  4:37       ` Konrad Rzeszutek Wilk
2013-01-21 15:24       ` Russell King - ARM Linux
2013-01-21 15:24         ` Russell King - ARM Linux
2013-01-22 20:33         ` Konrad Rzeszutek Wilk
2013-01-22 20:33           ` Konrad Rzeszutek Wilk
2013-01-19  1:11   ` Matt Sealey
2013-01-19  1:11     ` Matt Sealey
2013-01-19  4:46     ` Konrad Rzeszutek Wilk
2013-01-19  4:46       ` Konrad Rzeszutek Wilk
2013-01-21  5:55       ` Minchan Kim
2013-01-21  5:55         ` Minchan Kim
2013-01-21 16:00         ` Matt Sealey
2013-01-21 16:00           ` Matt Sealey
2013-01-22 15:48           ` Minchan Kim
2013-01-22 15:48             ` Minchan Kim
2013-01-22 20:34         ` Konrad Rzeszutek Wilk [this message]
2013-01-22 20:34           ` Konrad Rzeszutek Wilk
2013-01-21 16:20       ` Matt Sealey
2013-01-21 16:20         ` Matt Sealey
2013-01-21 16:29         ` Russell King - ARM Linux
2013-01-21 16:29           ` Russell King - ARM Linux

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=20130122203450.GD12371@phenom.dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.