All of lore.kernel.org
 help / color / mirror / Atom feed
From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	jeremy@goop.org, hughd@google.com, ngupta@vflare.org,
	Konrad Wilk <konrad.wilk@oracle.com>,
	JBeulich@novell.com, Kurt Hackel <kurt.hackel@oracle.com>,
	npiggin@kernel.dk, akpm@linux-foundation.org, riel@redhat.com,
	hannes@cmpxchg.org, matthew@wil.cx,
	Chris Mason <chris.mason@oracle.com>,
	kamezawa.hiroyu@jp.fujitsu.com, jackdachef@gmail.com,
	cyclonusj@gmail.com, levinsasha928@gmail.com
Subject: Re: [PATCH V9 3/6] mm: frontswap: core frontswap functionality
Date: Tue, 13 Sep 2011 16:59:14 -0500	[thread overview]
Message-ID: <4E6FD232.6030000@linux.vnet.ibm.com> (raw)
In-Reply-To: <f477a147-9948-4bef-973a-1f77bd185da1@default>

On 09/13/2011 03:50 PM, Dan Magenheimer wrote:
>> From: Seth Jennings [mailto:sjenning@linux.vnet.ibm.com]
>> Subject: Re: [PATCH V9 3/6] mm: frontswap: core frontswap functionality
>>
>> Hey Dan,
>>
>> I get the following compile warnings:
>>
>> mm/frontswap.c: In function 'init_frontswap':
>> mm/frontswap.c:264:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
>> mm/frontswap.c:266:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
>> mm/frontswap.c:268:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
>> mm/frontswap.c:270:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
> 
> Thanks for checking on 32-bit!
>  
>> size_t is platform dependent but is generally "unsigned int"
>> for 32-bit and "unsigned long" for 64-bit.
>>
>> I think just typecasting these to size_t * would fix it.
> 
> Actually, I think the best fix is likely to change the variables
> and the debugfs calls to u64 since even on 32-bit, the
> counters may exceed 2**32 on a heavily-loaded long-running
> system.
> 

That was going to be my other suggestion :)  I thought I'd suggest
the route that didn't involve you having to retype the counters.  But
the u64 solution is cleaner and, as Andrew pointed out, less risky.

> I'll give it a day or two to see if anyone else has any feedback
> before I fix this for V10.
> 
> Dan


WARNING: multiple messages have this Message-ID (diff)
From: Seth Jennings <sjenning@linux.vnet.ibm.com>
To: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	jeremy@goop.org, hughd@google.com, ngupta@vflare.org,
	Konrad Wilk <konrad.wilk@oracle.com>,
	JBeulich@novell.com, Kurt Hackel <kurt.hackel@oracle.com>,
	npiggin@kernel.dk, akpm@linux-foundation.org, riel@redhat.com,
	hannes@cmpxchg.org, matthew@wil.cx,
	Chris Mason <chris.mason@oracle.com>,
	kamezawa.hiroyu@jp.fujitsu.com, jackdachef@gmail.com,
	cyclonusj@gmail.com, levinsasha928@gmail.com
Subject: Re: [PATCH V9 3/6] mm: frontswap: core frontswap functionality
Date: Tue, 13 Sep 2011 16:59:14 -0500	[thread overview]
Message-ID: <4E6FD232.6030000@linux.vnet.ibm.com> (raw)
In-Reply-To: <f477a147-9948-4bef-973a-1f77bd185da1@default>

On 09/13/2011 03:50 PM, Dan Magenheimer wrote:
>> From: Seth Jennings [mailto:sjenning@linux.vnet.ibm.com]
>> Subject: Re: [PATCH V9 3/6] mm: frontswap: core frontswap functionality
>>
>> Hey Dan,
>>
>> I get the following compile warnings:
>>
>> mm/frontswap.c: In function 'init_frontswap':
>> mm/frontswap.c:264:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
>> mm/frontswap.c:266:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
>> mm/frontswap.c:268:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
>> mm/frontswap.c:270:5: warning: passing argument 4 of 'debugfs_create_size_t' from incompatible pointer
>> type
>> include/linux/debugfs.h:68:16: note: expected 'size_t *' but argument is of type 'long unsigned int *'
> 
> Thanks for checking on 32-bit!
>  
>> size_t is platform dependent but is generally "unsigned int"
>> for 32-bit and "unsigned long" for 64-bit.
>>
>> I think just typecasting these to size_t * would fix it.
> 
> Actually, I think the best fix is likely to change the variables
> and the debugfs calls to u64 since even on 32-bit, the
> counters may exceed 2**32 on a heavily-loaded long-running
> system.
> 

That was going to be my other suggestion :)  I thought I'd suggest
the route that didn't involve you having to retype the counters.  But
the u64 solution is cleaner and, as Andrew pointed out, less risky.

> I'll give it a day or two to see if anyone else has any feedback
> before I fix this for V10.
> 
> Dan

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2011-09-13 21:59 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-13 17:40 [PATCH V9 3/6] mm: frontswap: core frontswap functionality Dan Magenheimer
2011-09-13 17:40 ` Dan Magenheimer
2011-09-13 20:40 ` Seth Jennings
2011-09-13 20:40   ` Seth Jennings
2011-09-13 20:50   ` Dan Magenheimer
2011-09-13 20:50     ` Dan Magenheimer
2011-09-13 21:59     ` Seth Jennings [this message]
2011-09-13 21:59       ` Seth Jennings
2011-09-13 20:51   ` Andrew Morton
2011-09-13 20:51     ` Andrew Morton

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=4E6FD232.6030000@linux.vnet.ibm.com \
    --to=sjenning@linux.vnet.ibm.com \
    --cc=JBeulich@novell.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris.mason@oracle.com \
    --cc=cyclonusj@gmail.com \
    --cc=dan.magenheimer@oracle.com \
    --cc=hannes@cmpxchg.org \
    --cc=hughd@google.com \
    --cc=jackdachef@gmail.com \
    --cc=jeremy@goop.org \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=konrad.wilk@oracle.com \
    --cc=kurt.hackel@oracle.com \
    --cc=levinsasha928@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=matthew@wil.cx \
    --cc=ngupta@vflare.org \
    --cc=npiggin@kernel.dk \
    --cc=riel@redhat.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 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.