linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [RFC/PATCH] zcache2 on PPC64 (Was: [RFC] mm: add support for zsmalloc and zcache)
@ 2012-09-25 23:31 Dan Magenheimer
  2012-09-28 13:31 ` Mel Gorman
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Magenheimer @ 2012-09-25 23:31 UTC (permalink / raw)
  To: Seth Jennings, Konrad Wilk, Robert Jennings
  Cc: Mel Gorman, Greg Kroah-Hartman, Andrew Morton, Nitin Gupta,
	Minchan Kim, Xiao Guangrong, linux-mm, linux-kernel, devel,
	James Bottomley

Attached patch applies to staging-next and I _think_ should
fix the reported problem where zbud in zcache2 does not
work on a PPC64 with PAGE_SIZE!=12.  I do not have a machine
to test this so testing by others would be appreciated.

Ideally there should also be a BUILD_BUG_ON to ensure
PAGE_SHIFT * 2 + 2 doesn't exceed BITS_PER_LONG, but
let's see if this fixes the problem first.

Apologies if there are line breaks... I can't send this from
a linux mailer right now.  If it is broken, let me know,
and I will re-post tomorrow... though it should be easy
to apply manually for test purposes.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>

diff --git a/drivers/staging/ramster/zbud.c b/drivers/staging/ramster/zbud.c
index a7c4361..6921af3 100644
--- a/drivers/staging/ramster/zbud.c
+++ b/drivers/staging/ramster/zbud.c
@@ -103,8 +103,8 @@ struct zbudpage {
 		struct {
 			unsigned long space_for_flags;
 			struct {
-				unsigned zbud0_size:12;
-				unsigned zbud1_size:12;
+				unsigned zbud0_size:PAGE_SHIFT;
+				unsigned zbud1_size:PAGE_SHIFT;
 				unsigned unevictable:2;
 			};
 			struct list_head budlist;

--
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>

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [RFC/PATCH] zcache2 on PPC64 (Was: [RFC] mm: add support for zsmalloc and zcache)
  2012-09-25 23:31 [RFC/PATCH] zcache2 on PPC64 (Was: [RFC] mm: add support for zsmalloc and zcache) Dan Magenheimer
@ 2012-09-28 13:31 ` Mel Gorman
  2012-10-02 16:11   ` Seth Jennings
  0 siblings, 1 reply; 3+ messages in thread
From: Mel Gorman @ 2012-09-28 13:31 UTC (permalink / raw)
  To: Dan Magenheimer
  Cc: Seth Jennings, Konrad Wilk, Robert Jennings, Greg Kroah-Hartman,
	Andrew Morton, Nitin Gupta, Minchan Kim, Xiao Guangrong, linux-mm,
	linux-kernel, devel, James Bottomley

On Tue, Sep 25, 2012 at 04:31:01PM -0700, Dan Magenheimer wrote:
> Attached patch applies to staging-next and I _think_ should
> fix the reported problem where zbud in zcache2 does not
> work on a PPC64 with PAGE_SIZE!=12.  I do not have a machine
> to test this so testing by others would be appreciated.
> 

Seth, can you verify?

-- 
Mel Gorman
SUSE Labs

--
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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC/PATCH] zcache2 on PPC64 (Was: [RFC] mm: add support for zsmalloc and zcache)
  2012-09-28 13:31 ` Mel Gorman
@ 2012-10-02 16:11   ` Seth Jennings
  0 siblings, 0 replies; 3+ messages in thread
From: Seth Jennings @ 2012-10-02 16:11 UTC (permalink / raw)
  To: Mel Gorman
  Cc: Dan Magenheimer, Konrad Wilk, Robert Jennings, Greg Kroah-Hartman,
	Andrew Morton, Nitin Gupta, Minchan Kim, Xiao Guangrong, linux-mm,
	linux-kernel, devel, James Bottomley

On 09/28/2012 08:31 AM, Mel Gorman wrote:
> On Tue, Sep 25, 2012 at 04:31:01PM -0700, Dan Magenheimer wrote:
>> Attached patch applies to staging-next and I _think_ should
>> fix the reported problem where zbud in zcache2 does not
>> work on a PPC64 with PAGE_SIZE!=12.  I do not have a machine
>> to test this so testing by others would be appreciated.
>>
> 
> Seth, can you verify?

Yes, this patch does prevent the crash on PPC64.

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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-02 16:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-25 23:31 [RFC/PATCH] zcache2 on PPC64 (Was: [RFC] mm: add support for zsmalloc and zcache) Dan Magenheimer
2012-09-28 13:31 ` Mel Gorman
2012-10-02 16:11   ` Seth Jennings

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).