linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/gup_benchmark: mark gup_benchmark_init as __init function
@ 2020-11-03  8:10 Barry Song
  2020-11-05 19:52 ` Jason Gunthorpe
  0 siblings, 1 reply; 2+ messages in thread
From: Barry Song @ 2020-11-03  8:10 UTC (permalink / raw)
  To: akpm, linux-mm, linux-kernel
  Cc: linuxarm, Barry Song, John Hubbard, Jan Kara,
	Jérôme Glisse, Matthew Wilcox (Oracle),
	Al Viro, Christoph Hellwig, Dan Williams, Dave Chinner,
	Jason Gunthorpe, Jonathan Corbet, Michal Hocko, Mike Kravetz,
	Shuah Khan, Vlastimil Babka

gup_benchmark_init() is only called during initialization, mark it as
__init to save some memory.

Cc: John Hubbard <jhubbard@nvidia.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Jérôme Glisse <jglisse@redhat.com>
Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jason Gunthorpe <jgg@ziepe.ca>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Vlastimil Babka <vbabka@suse.cz>
Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
---
 mm/gup_benchmark.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/mm/gup_benchmark.c b/mm/gup_benchmark.c
index 8b3e5b5..1d10553 100644
--- a/mm/gup_benchmark.c
+++ b/mm/gup_benchmark.c
@@ -199,7 +199,7 @@ static const struct file_operations gup_benchmark_fops = {
 	.unlocked_ioctl = gup_benchmark_ioctl,
 };
 
-static int gup_benchmark_init(void)
+static int __init gup_benchmark_init(void)
 {
 	debugfs_create_file_unsafe("gup_benchmark", 0600, NULL, NULL,
 				   &gup_benchmark_fops);
-- 
2.7.4



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

* Re: [PATCH] mm/gup_benchmark: mark gup_benchmark_init as __init function
  2020-11-03  8:10 [PATCH] mm/gup_benchmark: mark gup_benchmark_init as __init function Barry Song
@ 2020-11-05 19:52 ` Jason Gunthorpe
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-11-05 19:52 UTC (permalink / raw)
  To: Barry Song
  Cc: akpm, linux-mm, linux-kernel, linuxarm, John Hubbard, Jan Kara,
	Jérôme Glisse, Matthew Wilcox (Oracle),
	Al Viro, Christoph Hellwig, Dan Williams, Dave Chinner,
	Jonathan Corbet, Michal Hocko, Mike Kravetz, Shuah Khan,
	Vlastimil Babka

On Tue, Nov 03, 2020 at 09:10:16PM +1300, Barry Song wrote:
> gup_benchmark_init() is only called during initialization, mark it as
> __init to save some memory.
> 
> Cc: John Hubbard <jhubbard@nvidia.com>
> Cc: Jan Kara <jack@suse.cz>
> Cc: Jérôme Glisse <jglisse@redhat.com>
> Cc: "Matthew Wilcox (Oracle)" <willy@infradead.org>
> Cc: Al Viro <viro@zeniv.linux.org.uk>
> Cc: Christoph Hellwig <hch@infradead.org>
> Cc: Dan Williams <dan.j.williams@intel.com>
> Cc: Dave Chinner <david@fromorbit.com>
> Cc: Jason Gunthorpe <jgg@ziepe.ca>
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: Michal Hocko <mhocko@suse.com>
> Cc: Mike Kravetz <mike.kravetz@oracle.com>
> Cc: Shuah Khan <shuah@kernel.org>
> Cc: Vlastimil Babka <vbabka@suse.cz>
> Signed-off-by: Barry Song <song.bao.hua@hisilicon.com>
> ---
>  mm/gup_benchmark.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Hardly seems worthwhile, but looks correct

Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>

Jason


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

end of thread, other threads:[~2020-11-05 19:52 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-03  8:10 [PATCH] mm/gup_benchmark: mark gup_benchmark_init as __init function Barry Song
2020-11-05 19:52 ` Jason Gunthorpe

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