* [PATCH] mm: filemap: remove include of hardirq.h
@ 2017-11-03 18:47 Yang Shi
2017-11-04 13:47 ` Matthew Wilcox
0 siblings, 1 reply; 3+ messages in thread
From: Yang Shi @ 2017-11-03 18:47 UTC (permalink / raw)
To: mhocko, akpm; +Cc: Yang Shi, linux-mm, linux-kernel
in_atomic() has been moved to include/linux/preempt.h, and the filemap.c
doesn't use in_atomic() directly at all, so it sounds unnecessary to
include hardirq.h.
With removing hardirq.h, around 32 bytes can be saved for x86_64 bzImage
with allnoconfig.
Signed-off-by: Yang Shi <yang.s@alibaba-inc.com>
---
mm/filemap.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/mm/filemap.c b/mm/filemap.c
index 594d73f..57238f4 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -31,7 +31,6 @@
#include <linux/blkdev.h>
#include <linux/security.h>
#include <linux/cpuset.h>
-#include <linux/hardirq.h> /* for BUG_ON(!in_atomic()) only */
#include <linux/hugetlb.h>
#include <linux/memcontrol.h>
#include <linux/cleancache.h>
--
1.8.3.1
--
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: [PATCH] mm: filemap: remove include of hardirq.h
2017-11-03 18:47 [PATCH] mm: filemap: remove include of hardirq.h Yang Shi
@ 2017-11-04 13:47 ` Matthew Wilcox
2017-11-06 16:06 ` Yang Shi
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2017-11-04 13:47 UTC (permalink / raw)
To: Yang Shi; +Cc: mhocko, akpm, linux-mm, linux-kernel
On Sat, Nov 04, 2017 at 02:47:48AM +0800, Yang Shi wrote:
> in_atomic() has been moved to include/linux/preempt.h, and the filemap.c
> doesn't use in_atomic() directly at all, so it sounds unnecessary to
> include hardirq.h.
> With removing hardirq.h, around 32 bytes can be saved for x86_64 bzImage
> with allnoconfig.
Wait, what? How would including an unused header file increase the size
of the final image?
--
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: [PATCH] mm: filemap: remove include of hardirq.h
2017-11-04 13:47 ` Matthew Wilcox
@ 2017-11-06 16:06 ` Yang Shi
0 siblings, 0 replies; 3+ messages in thread
From: Yang Shi @ 2017-11-06 16:06 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: mhocko, akpm, linux-mm, linux-kernel
On 11/4/17 6:47 AM, Matthew Wilcox wrote:
> On Sat, Nov 04, 2017 at 02:47:48AM +0800, Yang Shi wrote:
>> in_atomic() has been moved to include/linux/preempt.h, and the filemap.c
>> doesn't use in_atomic() directly at all, so it sounds unnecessary to
>> include hardirq.h.
>> With removing hardirq.h, around 32 bytes can be saved for x86_64 bzImage
>> with allnoconfig.
>
> Wait, what? How would including an unused header file increase the size
> of the final image?
Sorry for the wrong message, I double checked again with building kernel
a couple of times then comparing the size, there is no change. Will
remove this from the commit log.
Yang
>
--
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:[~2017-11-06 16:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-03 18:47 [PATCH] mm: filemap: remove include of hardirq.h Yang Shi
2017-11-04 13:47 ` Matthew Wilcox
2017-11-06 16:06 ` Yang Shi
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).