* [PATCH] mm: move swp_entry_t definition to include/linux/mm_types.h
@ 2014-11-17 21:17 Tejun Heo
2014-11-17 21:29 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Tejun Heo @ 2014-11-17 21:17 UTC (permalink / raw)
To: Andrew Morton; +Cc: Mel Gorman, Johannes Weiner, linux-kernel
swp_entry_t being defined in include/linux/swap.h instead of
include/linux/mm_types.h causes cyclic include dependency later when
include/linux/page_cgroup.h is included from writeback path. Move the
definition to include/linux/mm_types.h.
While at it, reformat the comment above it.
Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Cc: Johannes Weiner <hannes@cmpxchg.org>
---
include/linux/mm_types.h | 8 ++++++++
include/linux/swap.h | 8 --------
2 files changed, 8 insertions(+), 8 deletions(-)
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -525,4 +525,12 @@ enum tlb_flush_reason {
NR_TLB_FLUSH_REASONS,
};
+ /*
+ * A swap entry has to fit into a "unsigned long", as the entry is hidden
+ * in the "index" field of the swapper address space.
+ */
+typedef struct {
+ unsigned long val;
+} swp_entry_t;
+
#endif /* _LINUX_MM_TYPES_H */
--- a/include/linux/swap.h
+++ b/include/linux/swap.h
@@ -102,14 +102,6 @@ union swap_header {
} info;
};
- /* A swap entry has to fit into a "unsigned long", as
- * the entry is hidden in the "index" field of the
- * swapper address space.
- */
-typedef struct {
- unsigned long val;
-} swp_entry_t;
-
/*
* current->reclaim_state points to one of these when a task is running
* memory reclaim
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: move swp_entry_t definition to include/linux/mm_types.h
2014-11-17 21:17 [PATCH] mm: move swp_entry_t definition to include/linux/mm_types.h Tejun Heo
@ 2014-11-17 21:29 ` Andrew Morton
2014-11-17 21:32 ` Tejun Heo
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2014-11-17 21:29 UTC (permalink / raw)
To: Tejun Heo; +Cc: Mel Gorman, Johannes Weiner, linux-kernel
On Mon, 17 Nov 2014 16:17:23 -0500 Tejun Heo <tj@kernel.org> wrote:
> swp_entry_t being defined in include/linux/swap.h instead of
> include/linux/mm_types.h causes cyclic include dependency later when
> include/linux/page_cgroup.h is included from writeback path. Move the
> definition to include/linux/mm_types.h.
>
> While at it, reformat the comment above it.
>
> ...
>
> --- a/include/linux/mm_types.h
> +++ b/include/linux/mm_types.h
> @@ -525,4 +525,12 @@ enum tlb_flush_reason {
> NR_TLB_FLUSH_REASONS,
> };
>
> + /*
> + * A swap entry has to fit into a "unsigned long", as the entry is hidden
> + * in the "index" field of the swapper address space.
> + */
> +typedef struct {
> + unsigned long val;
> +} swp_entry_t;
> +
> #endif /* _LINUX_MM_TYPES_H */
> --- a/include/linux/swap.h
> +++ b/include/linux/swap.h
> @@ -102,14 +102,6 @@ union swap_header {
> } info;
> };
>
> - /* A swap entry has to fit into a "unsigned long", as
> - * the entry is hidden in the "index" field of the
> - * swapper address space.
> - */
> -typedef struct {
> - unsigned long val;
> -} swp_entry_t;
> -
> /*
> * current->reclaim_state points to one of these when a task is running
> * memory reclaim
Looks OK to me. Do you have some patch which depends on this? If
so, please merge this via whatever tree carries that patch?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: move swp_entry_t definition to include/linux/mm_types.h
2014-11-17 21:29 ` Andrew Morton
@ 2014-11-17 21:32 ` Tejun Heo
0 siblings, 0 replies; 3+ messages in thread
From: Tejun Heo @ 2014-11-17 21:32 UTC (permalink / raw)
To: Andrew Morton; +Cc: Mel Gorman, Johannes Weiner, linux-kernel
On Mon, Nov 17, 2014 at 01:29:00PM -0800, Andrew Morton wrote:
> Looks OK to me. Do you have some patch which depends on this? If
> so, please merge this via whatever tree carries that patch?
The dependant ones will have to go through -mm anyway, so applying to
-mm should be fine.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-17 21:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-17 21:17 [PATCH] mm: move swp_entry_t definition to include/linux/mm_types.h Tejun Heo
2014-11-17 21:29 ` Andrew Morton
2014-11-17 21:32 ` Tejun Heo
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).