* [PATCH] mm: remove inline from scan_swap_map
@ 2011-03-05 18:49 Cesar Eduardo Barros
2011-03-05 18:51 ` Pekka Enberg
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Cesar Eduardo Barros @ 2011-03-05 18:49 UTC (permalink / raw)
To: linux-mm
Cc: Andrew Morton, Hugh Dickins, KAMEZAWA Hiroyuki, Minchan Kim,
Jens Axboe, linux-kernel, Cesar Eduardo Barros
scan_swap_map is a large function (224 lines), with several loops and a
complex control flow involving several gotos.
Given all that, it is a bit silly that is is marked as inline. The
compiler agrees with me: on a x86-64 compile, it did not inline the
function.
Remove the "inline" and let the compiler decide instead.
Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
---
mm/swapfile.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index 0341c57..8ed42e7 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -212,8 +212,8 @@ static int wait_for_discard(void *word)
#define SWAPFILE_CLUSTER 256
#define LATENCY_LIMIT 256
-static inline unsigned long scan_swap_map(struct swap_info_struct *si,
- unsigned char usage)
+static unsigned long scan_swap_map(struct swap_info_struct *si,
+ unsigned char usage)
{
unsigned long offset;
unsigned long scan_base;
--
1.7.4
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: remove inline from scan_swap_map
2011-03-05 18:49 [PATCH] mm: remove inline from scan_swap_map Cesar Eduardo Barros
@ 2011-03-05 18:51 ` Pekka Enberg
2011-03-07 1:27 ` KOSAKI Motohiro
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Pekka Enberg @ 2011-03-05 18:51 UTC (permalink / raw)
To: Cesar Eduardo Barros
Cc: linux-mm, Andrew Morton, Hugh Dickins, KAMEZAWA Hiroyuki,
Minchan Kim, Jens Axboe, linux-kernel
On Sat, Mar 5, 2011 at 8:49 PM, Cesar Eduardo Barros <cesarb@cesarb.net> wrote:
> scan_swap_map is a large function (224 lines), with several loops and a
> complex control flow involving several gotos.
>
> Given all that, it is a bit silly that is is marked as inline. The
> compiler agrees with me: on a x86-64 compile, it did not inline the
> function.
>
> Remove the "inline" and let the compiler decide instead.
>
> Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: remove inline from scan_swap_map
2011-03-05 18:49 [PATCH] mm: remove inline from scan_swap_map Cesar Eduardo Barros
2011-03-05 18:51 ` Pekka Enberg
@ 2011-03-07 1:27 ` KOSAKI Motohiro
2011-03-07 6:07 ` KAMEZAWA Hiroyuki
2011-03-07 15:39 ` Minchan Kim
3 siblings, 0 replies; 5+ messages in thread
From: KOSAKI Motohiro @ 2011-03-07 1:27 UTC (permalink / raw)
To: Cesar Eduardo Barros
Cc: kosaki.motohiro, linux-mm, Andrew Morton, Hugh Dickins,
KAMEZAWA Hiroyuki, Minchan Kim, Jens Axboe, linux-kernel
> scan_swap_map is a large function (224 lines), with several loops and a
> complex control flow involving several gotos.
>
> Given all that, it is a bit silly that is is marked as inline. The
> compiler agrees with me: on a x86-64 compile, it did not inline the
> function.
>
> Remove the "inline" and let the compiler decide instead.
>
> Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
> ---
> mm/swapfile.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/swapfile.c b/mm/swapfile.c
> index 0341c57..8ed42e7 100644
> --- a/mm/swapfile.c
> +++ b/mm/swapfile.c
> @@ -212,8 +212,8 @@ static int wait_for_discard(void *word)
> #define SWAPFILE_CLUSTER 256
> #define LATENCY_LIMIT 256
>
> -static inline unsigned long scan_swap_map(struct swap_info_struct *si,
> - unsigned char usage)
> +static unsigned long scan_swap_map(struct swap_info_struct *si,
> + unsigned char usage)
I agree.
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: remove inline from scan_swap_map
2011-03-05 18:49 [PATCH] mm: remove inline from scan_swap_map Cesar Eduardo Barros
2011-03-05 18:51 ` Pekka Enberg
2011-03-07 1:27 ` KOSAKI Motohiro
@ 2011-03-07 6:07 ` KAMEZAWA Hiroyuki
2011-03-07 15:39 ` Minchan Kim
3 siblings, 0 replies; 5+ messages in thread
From: KAMEZAWA Hiroyuki @ 2011-03-07 6:07 UTC (permalink / raw)
To: Cesar Eduardo Barros
Cc: linux-mm, Andrew Morton, Hugh Dickins, Minchan Kim, Jens Axboe,
linux-kernel
On Sat, 5 Mar 2011 15:49:16 -0300
Cesar Eduardo Barros <cesarb@cesarb.net> wrote:
> scan_swap_map is a large function (224 lines), with several loops and a
> complex control flow involving several gotos.
>
> Given all that, it is a bit silly that is is marked as inline. The
> compiler agrees with me: on a x86-64 compile, it did not inline the
> function.
>
> Remove the "inline" and let the compiler decide instead.
>
> Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: remove inline from scan_swap_map
2011-03-05 18:49 [PATCH] mm: remove inline from scan_swap_map Cesar Eduardo Barros
` (2 preceding siblings ...)
2011-03-07 6:07 ` KAMEZAWA Hiroyuki
@ 2011-03-07 15:39 ` Minchan Kim
3 siblings, 0 replies; 5+ messages in thread
From: Minchan Kim @ 2011-03-07 15:39 UTC (permalink / raw)
To: Cesar Eduardo Barros
Cc: linux-mm, Andrew Morton, Hugh Dickins, KAMEZAWA Hiroyuki,
Jens Axboe, linux-kernel
On Sun, Mar 6, 2011 at 3:49 AM, Cesar Eduardo Barros <cesarb@cesarb.net> wrote:
> scan_swap_map is a large function (224 lines), with several loops and a
> complex control flow involving several gotos.
>
> Given all that, it is a bit silly that is is marked as inline. The
> compiler agrees with me: on a x86-64 compile, it did not inline the
> function.
>
> Remove the "inline" and let the compiler decide instead.
>
> Signed-off-by: Cesar Eduardo Barros <cesarb@cesarb.net>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
--
Kind regards,
Minchan Kim
--
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>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-03-07 15:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-05 18:49 [PATCH] mm: remove inline from scan_swap_map Cesar Eduardo Barros
2011-03-05 18:51 ` Pekka Enberg
2011-03-07 1:27 ` KOSAKI Motohiro
2011-03-07 6:07 ` KAMEZAWA Hiroyuki
2011-03-07 15:39 ` Minchan Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox