All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-08 16:10 ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas


The motivation of this series is to cut down unnecessary header
dependency in terms of radix tree.

Sub-systems or drivers that use radix-tree for data management
typically embed struct radix_tree_root in their data structures,
like this:

struct foo {
       ...

       struct radix_tree_root   foo_tree;
       ...
};

So, <linux/foo.h> needs to include <linux/radix-tree.h>,
therefore, users of <linux/foo.h> include a lot of bloat
from <linux/radix-tree.h>.

If you see the definition of radix_tree_root,

   struct radix_tree_root {
           gfp_t			gfp_mask;
	   struct radix_tree_node	__rcu *rnode;
   };

it is a very simple structure.
It only depends on <linux/types.h> for gfp_t and
<linux/compiler.h> for __rcu.

By splitting out the radix_tree_root definition,
we can reduce the header file dependency.

Reducing the header dependency will help for speeding the kernel
build, suppressing unnecessary recompile of objects during
git-bisect'ing, etc.

The patch 1 is a trivial clean-up; it is just here
to avoid conflict.

The patch 2 is the main part of this series;
split out struct radix_tree_root.

The rest of the series replace <linux/radix-tree.h>
with <linux/radix-tree-root.h> where appropriate.

Please review if the idea is OK.

If it is OK, I'd like to know how to apply the series.

Perhaps, the first two for v4.15.  Then, rest of series
will be sent per-subsystem for v4.16?

Or, can somebody take care of the whole series?

I checked allmodconfig for x86 and arm64.
I am expecting 0 day testing will check it too.



Masahiro Yamada (12):
  radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h>
  radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h>
  irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  writeback: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  iocontext.h: replace <linux/radix-tree.h> with
    <linux/radix-tree-root.h>
  fs: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  blkcg: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  fscache: include <linux-radix-tree.h>
  sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  drm/i915: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>

 drivers/gpu/drm/i915/i915_gem.c            |  1 +
 drivers/gpu/drm/i915/i915_gem_context.c    |  1 +
 drivers/gpu/drm/i915/i915_gem_context.h    |  2 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  1 +
 drivers/gpu/drm/i915/i915_gem_object.h     |  1 +
 drivers/net/ethernet/mellanox/mlx4/cq.c    |  1 +
 drivers/net/ethernet/mellanox/mlx4/mlx4.h  |  2 +-
 drivers/net/ethernet/mellanox/mlx4/qp.c    |  1 +
 drivers/net/ethernet/mellanox/mlx4/srq.c   |  1 +
 drivers/sh/intc/internals.h                |  2 +-
 include/linux/backing-dev-defs.h           |  2 +-
 include/linux/blk-cgroup.h                 |  2 +-
 include/linux/fs.h                         |  2 +-
 include/linux/fscache.h                    |  1 +
 include/linux/iocontext.h                  |  2 +-
 include/linux/irqdomain.h                  |  2 +-
 include/linux/mlx4/device.h                |  2 +-
 include/linux/mlx4/qp.h                    |  1 +
 include/linux/mlx5/driver.h                |  2 +-
 include/linux/mlx5/qp.h                    |  1 +
 include/linux/radix-tree-root.h            | 24 ++++++++++++++++++++++++
 include/linux/radix-tree.h                 |  8 ++------
 22 files changed, 46 insertions(+), 16 deletions(-)
 create mode 100644 include/linux/radix-tree-root.h

-- 
2.7.4


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

* [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-08 16:10 ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas


The motivation of this series is to cut down unnecessary header
dependency in terms of radix tree.

Sub-systems or drivers that use radix-tree for data management
typically embed struct radix_tree_root in their data structures,
like this:

struct foo {
       ...

       struct radix_tree_root   foo_tree;
       ...
};

So, <linux/foo.h> needs to include <linux/radix-tree.h>,
therefore, users of <linux/foo.h> include a lot of bloat
from <linux/radix-tree.h>.

If you see the definition of radix_tree_root,

   struct radix_tree_root {
           gfp_t			gfp_mask;
	   struct radix_tree_node	__rcu *rnode;
   };

it is a very simple structure.
It only depends on <linux/types.h> for gfp_t and
<linux/compiler.h> for __rcu.

By splitting out the radix_tree_root definition,
we can reduce the header file dependency.

Reducing the header dependency will help for speeding the kernel
build, suppressing unnecessary recompile of objects during
git-bisect'ing, etc.

The patch 1 is a trivial clean-up; it is just here
to avoid conflict.

The patch 2 is the main part of this series;
split out struct radix_tree_root.

The rest of the series replace <linux/radix-tree.h>
with <linux/radix-tree-root.h> where appropriate.

Please review if the idea is OK.

If it is OK, I'd like to know how to apply the series.

Perhaps, the first two for v4.15.  Then, rest of series
will be sent per-subsystem for v4.16?

Or, can somebody take care of the whole series?

I checked allmodconfig for x86 and arm64.
I am expecting 0 day testing will check it too.



Masahiro Yamada (12):
  radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h>
  radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h>
  irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  writeback: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  iocontext.h: replace <linux/radix-tree.h> with
    <linux/radix-tree-root.h>
  fs: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  blkcg: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  fscache: include <linux-radix-tree.h>
  sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  drm/i915: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>

 drivers/gpu/drm/i915/i915_gem.c            |  1 +
 drivers/gpu/drm/i915/i915_gem_context.c    |  1 +
 drivers/gpu/drm/i915/i915_gem_context.h    |  2 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  1 +
 drivers/gpu/drm/i915/i915_gem_object.h     |  1 +
 drivers/net/ethernet/mellanox/mlx4/cq.c    |  1 +
 drivers/net/ethernet/mellanox/mlx4/mlx4.h  |  2 +-
 drivers/net/ethernet/mellanox/mlx4/qp.c    |  1 +
 drivers/net/ethernet/mellanox/mlx4/srq.c   |  1 +
 drivers/sh/intc/internals.h                |  2 +-
 include/linux/backing-dev-defs.h           |  2 +-
 include/linux/blk-cgroup.h                 |  2 +-
 include/linux/fs.h                         |  2 +-
 include/linux/fscache.h                    |  1 +
 include/linux/iocontext.h                  |  2 +-
 include/linux/irqdomain.h                  |  2 +-
 include/linux/mlx4/device.h                |  2 +-
 include/linux/mlx4/qp.h                    |  1 +
 include/linux/mlx5/driver.h                |  2 +-
 include/linux/mlx5/qp.h                    |  1 +
 include/linux/radix-tree-root.h            | 24 ++++++++++++++++++++++++
 include/linux/radix-tree.h                 |  8 ++------
 22 files changed, 46 insertions(+), 16 deletions(-)
 create mode 100644 include/linux/radix-tree-root.h

-- 
2.7.4

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

* [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-08 16:10 ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas, Joonas Lahtinen, Matan Barak, netdev,
	Saeed Mahameed, Jeff Layton, linux-fsdevel, Marc Zyngier


The motivation of this series is to cut down unnecessary header
dependency in terms of radix tree.

Sub-systems or drivers that use radix-tree for data management
typically embed struct radix_tree_root in their data structures,
like this:

struct foo {
       ...

       struct radix_tree_root   foo_tree;
       ...
};

So, <linux/foo.h> needs to include <linux/radix-tree.h>,
therefore, users of <linux/foo.h> include a lot of bloat
from <linux/radix-tree.h>.

If you see the definition of radix_tree_root,

   struct radix_tree_root {
           gfp_t			gfp_mask;
	   struct radix_tree_node	__rcu *rnode;
   };

it is a very simple structure.
It only depends on <linux/types.h> for gfp_t and
<linux/compiler.h> for __rcu.

By splitting out the radix_tree_root definition,
we can reduce the header file dependency.

Reducing the header dependency will help for speeding the kernel
build, suppressing unnecessary recompile of objects during
git-bisect'ing, etc.

The patch 1 is a trivial clean-up; it is just here
to avoid conflict.

The patch 2 is the main part of this series;
split out struct radix_tree_root.

The rest of the series replace <linux/radix-tree.h>
with <linux/radix-tree-root.h> where appropriate.

Please review if the idea is OK.

If it is OK, I'd like to know how to apply the series.

Perhaps, the first two for v4.15.  Then, rest of series
will be sent per-subsystem for v4.16?

Or, can somebody take care of the whole series?

I checked allmodconfig for x86 and arm64.
I am expecting 0 day testing will check it too.



Masahiro Yamada (12):
  radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h>
  radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h>
  irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  writeback: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  iocontext.h: replace <linux/radix-tree.h> with
    <linux/radix-tree-root.h>
  fs: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  blkcg: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  fscache: include <linux-radix-tree.h>
  sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  drm/i915: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>

 drivers/gpu/drm/i915/i915_gem.c            |  1 +
 drivers/gpu/drm/i915/i915_gem_context.c    |  1 +
 drivers/gpu/drm/i915/i915_gem_context.h    |  2 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  1 +
 drivers/gpu/drm/i915/i915_gem_object.h     |  1 +
 drivers/net/ethernet/mellanox/mlx4/cq.c    |  1 +
 drivers/net/ethernet/mellanox/mlx4/mlx4.h  |  2 +-
 drivers/net/ethernet/mellanox/mlx4/qp.c    |  1 +
 drivers/net/ethernet/mellanox/mlx4/srq.c   |  1 +
 drivers/sh/intc/internals.h                |  2 +-
 include/linux/backing-dev-defs.h           |  2 +-
 include/linux/blk-cgroup.h                 |  2 +-
 include/linux/fs.h                         |  2 +-
 include/linux/fscache.h                    |  1 +
 include/linux/iocontext.h                  |  2 +-
 include/linux/irqdomain.h                  |  2 +-
 include/linux/mlx4/device.h                |  2 +-
 include/linux/mlx4/qp.h                    |  1 +
 include/linux/mlx5/driver.h                |  2 +-
 include/linux/mlx5/qp.h                    |  1 +
 include/linux/radix-tree-root.h            | 24 ++++++++++++++++++++++++
 include/linux/radix-tree.h                 |  8 ++------
 22 files changed, 46 insertions(+), 16 deletions(-)
 create mode 100644 include/linux/radix-tree-root.h

-- 
2.7.4

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

* [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-08 16:10 ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas


The motivation of this series is to cut down unnecessary header
dependency in terms of radix tree.

Sub-systems or drivers that use radix-tree for data management
typically embed struct radix_tree_root in their data structures,
like this:

struct foo {
       ...

       struct radix_tree_root   foo_tree;
       ...
};

So, <linux/foo.h> needs to include <linux/radix-tree.h>,
therefore, users of <linux/foo.h> include a lot of bloat
from <linux/radix-tree.h>.

If you see the definition of radix_tree_root,

   struct radix_tree_root {
           gfp_t			gfp_mask;
	   struct radix_tree_node	__rcu *rnode;
   };

it is a very simple structure.
It only depends on <linux/types.h> for gfp_t and
<linux/compiler.h> for __rcu.

By splitting out the radix_tree_root definition,
we can reduce the header file dependency.

Reducing the header dependency will help for speeding the kernel
build, suppressing unnecessary recompile of objects during
git-bisect'ing, etc.

The patch 1 is a trivial clean-up; it is just here
to avoid conflict.

The patch 2 is the main part of this series;
split out struct radix_tree_root.

The rest of the series replace <linux/radix-tree.h>
with <linux/radix-tree-root.h> where appropriate.

Please review if the idea is OK.

If it is OK, I'd like to know how to apply the series.

Perhaps, the first two for v4.15.  Then, rest of series
will be sent per-subsystem for v4.16?

Or, can somebody take care of the whole series?

I checked allmodconfig for x86 and arm64.
I am expecting 0 day testing will check it too.



Masahiro Yamada (12):
  radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h>
  radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h>
  irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  writeback: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  iocontext.h: replace <linux/radix-tree.h> with
    <linux/radix-tree-root.h>
  fs: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  blkcg: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  fscache: include <linux-radix-tree.h>
  sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  drm/i915: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>

 drivers/gpu/drm/i915/i915_gem.c            |  1 +
 drivers/gpu/drm/i915/i915_gem_context.c    |  1 +
 drivers/gpu/drm/i915/i915_gem_context.h    |  2 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c |  1 +
 drivers/gpu/drm/i915/i915_gem_object.h     |  1 +
 drivers/net/ethernet/mellanox/mlx4/cq.c    |  1 +
 drivers/net/ethernet/mellanox/mlx4/mlx4.h  |  2 +-
 drivers/net/ethernet/mellanox/mlx4/qp.c    |  1 +
 drivers/net/ethernet/mellanox/mlx4/srq.c   |  1 +
 drivers/sh/intc/internals.h                |  2 +-
 include/linux/backing-dev-defs.h           |  2 +-
 include/linux/blk-cgroup.h                 |  2 +-
 include/linux/fs.h                         |  2 +-
 include/linux/fscache.h                    |  1 +
 include/linux/iocontext.h                  |  2 +-
 include/linux/irqdomain.h                  |  2 +-
 include/linux/mlx4/device.h                |  2 +-
 include/linux/mlx4/qp.h                    |  1 +
 include/linux/mlx5/driver.h                |  2 +-
 include/linux/mlx5/qp.h                    |  1 +
 include/linux/radix-tree-root.h            | 24 ++++++++++++++++++++++++
 include/linux/radix-tree.h                 |  8 ++------
 22 files changed, 46 insertions(+), 16 deletions(-)
 create mode 100644 include/linux/radix-tree-root.h

-- 
2.7.4

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

* [PATCH 01/12] radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (2 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada

This header contains references to spinlock_t and lockdep_is_held(),
both of which are defined in <linux/spinlock_types.h>

Include <linux/spinlock_types.h> instead of <linux/spinlock.h> to reduce
the header dependency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/radix-tree.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 567ebb5..6df7fa9 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -27,7 +27,7 @@
 #include <linux/list.h>
 #include <linux/preempt.h>
 #include <linux/rcupdate.h>
-#include <linux/spinlock.h>
+#include <linux/spinlock_types.h>
 #include <linux/types.h>
 
 /*
-- 
2.7.4

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

* [PATCH 02/12] radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (3 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada

The idea is similar to the separation of <linux/spinlock_types.h>
and <linux/spinlock.h>.

The users of radix tree typically embed struct radix_tree_root in
their data structures, but those headers do not need to know anything
about the other radix tree stuff like radix_tree_node, accessors.

Including <linux/radix-tree.h> pulls in lots of bloat while struct
radix_tree_root only depends on <linux/types.h> for gfp_t, and
<linux/compiler.h> for __rcu.

To reduce the header dependency, split struct radix_tree_root out
to <linux/radix-tree-root.h>.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/radix-tree-root.h | 24 ++++++++++++++++++++++++
 include/linux/radix-tree.h      |  6 +-----
 2 files changed, 25 insertions(+), 5 deletions(-)
 create mode 100644 include/linux/radix-tree-root.h

diff --git a/include/linux/radix-tree-root.h b/include/linux/radix-tree-root.h
new file mode 100644
index 0000000..1726df0
--- /dev/null
+++ b/include/linux/radix-tree-root.h
@@ -0,0 +1,24 @@
+/*
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2, or (at
+ * your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ */
+
+#ifndef _LINUX_RADIX_TREE_ROOT_H
+#define _LINUX_RADIX_TREE_ROOT_H
+
+#include <linux/types.h>
+#include <linux/compiler.h>
+
+struct radix_tree_root {
+	gfp_t			gfp_mask;
+	struct radix_tree_node	__rcu *rnode;
+};
+
+#endif /* _LINUX_RADIX_TREE_ROOT_H */
diff --git a/include/linux/radix-tree.h b/include/linux/radix-tree.h
index 6df7fa9..db3fb1d 100644
--- a/include/linux/radix-tree.h
+++ b/include/linux/radix-tree.h
@@ -26,6 +26,7 @@
 #include <linux/kernel.h>
 #include <linux/list.h>
 #include <linux/preempt.h>
+#include <linux/radix-tree-root.h>
 #include <linux/rcupdate.h>
 #include <linux/spinlock_types.h>
 #include <linux/types.h>
@@ -109,11 +110,6 @@ struct radix_tree_node {
 #define ROOT_IS_IDR	((__force gfp_t)(1 << __GFP_BITS_SHIFT))
 #define ROOT_TAG_SHIFT	(__GFP_BITS_SHIFT + 1)
 
-struct radix_tree_root {
-	gfp_t			gfp_mask;
-	struct radix_tree_node	__rcu *rnode;
-};
-
 #define RADIX_TREE_INIT(mask)	{					\
 	.gfp_mask = (mask),						\
 	.rnode = NULL,							\
-- 
2.7.4

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

* [PATCH 03/12] irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (4 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, Marc Zyngier

This header requires the definition of struct radix_tree_root, but
does not need to know anything about other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the header dependency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/irqdomain.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h
index 81e4889..a1b30f8 100644
--- a/include/linux/irqdomain.h
+++ b/include/linux/irqdomain.h
@@ -32,7 +32,7 @@
 #include <linux/types.h>
 #include <linux/irqhandler.h>
 #include <linux/of.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 
 struct device_node;
 struct irq_domain;
-- 
2.7.4

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

* [PATCH 04/12] writeback: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (5 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada

This header requires the definition of struct radix_tree_root, but
does not need to know anything about other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the header dependency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/backing-dev-defs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h
index 866c433..f644f14 100644
--- a/include/linux/backing-dev-defs.h
+++ b/include/linux/backing-dev-defs.h
@@ -2,7 +2,7 @@
 #define __LINUX_BACKING_DEV_DEFS_H
 
 #include <linux/list.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 #include <linux/rbtree.h>
 #include <linux/spinlock.h>
 #include <linux/percpu_counter.h>
-- 
2.7.4

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

* [PATCH 05/12] iocontext.h: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (6 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada

This header requires the definition of struct radix_tree_root, but
does not need to know anything about other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the header dependency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/iocontext.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/iocontext.h b/include/linux/iocontext.h
index df38db2..dc0b587 100644
--- a/include/linux/iocontext.h
+++ b/include/linux/iocontext.h
@@ -1,7 +1,7 @@
 #ifndef IOCONTEXT_H
 #define IOCONTEXT_H
 
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 #include <linux/rcupdate.h>
 #include <linux/workqueue.h>
 
-- 
2.7.4

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

* [PATCH 06/12] fs: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (7 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, linux-fsdevel, Jeff Layton,
	J. Bruce Fields

This header requires the definition of struct radix_tree_root, but
does not need to know anything about other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the header dependency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 13dab19..9a47a1a 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -11,7 +11,7 @@
 #include <linux/list.h>
 #include <linux/list_lru.h>
 #include <linux/llist.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 #include <linux/rbtree.h>
 #include <linux/init.h>
 #include <linux/pid.h>
-- 
2.7.4

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

* [PATCH 07/12] blkcg: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (8 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada

This header requires the definition of struct radix_tree_root, but
does not need to know anything about other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the header dependency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/blk-cgroup.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
index 9d92153..c4ec324 100644
--- a/include/linux/blk-cgroup.h
+++ b/include/linux/blk-cgroup.h
@@ -16,7 +16,7 @@
 #include <linux/cgroup.h>
 #include <linux/percpu_counter.h>
 #include <linux/seq_file.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 #include <linux/blkdev.h>
 #include <linux/atomic.h>
 
-- 
2.7.4

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

* [PATCH 08/12] fscache: include <linux-radix-tree.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (9 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, David Howells, linux-cachefs

This header needs to know the definition of struct radix_tree_root.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/fscache.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/linux/fscache.h b/include/linux/fscache.h
index f4ff47d..0a67b2f5 100644
--- a/include/linux/fscache.h
+++ b/include/linux/fscache.h
@@ -22,6 +22,7 @@
 #include <linux/list.h>
 #include <linux/pagemap.h>
 #include <linux/pagevec.h>
+#include <linux/radix-tree-root.h>
 
 #if defined(CONFIG_FSCACHE) || defined(CONFIG_FSCACHE_MODULE)
 #define fscache_available() (1)
-- 
2.7.4

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

* [PATCH 09/12] sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
@ 2017-10-08 16:10   ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, Yoshinori Sato, Rich Felker,
	linux-sh

This header requires the definition of struct radix_tree_root, but
does not need to know anything about other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the header dependency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/sh/intc/internals.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index 6ce7f0d..4021c1c 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -4,7 +4,7 @@
 #include <linux/list.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 #include <linux/device.h>
 
 #define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \
-- 
2.7.4


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

* [PATCH 09/12] sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
@ 2017-10-08 16:10   ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, Yoshinori Sato, Rich Felker,
	linux-sh

This header requires the definition of struct radix_tree_root, but
does not need to know anything about other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the header dependency.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/sh/intc/internals.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/sh/intc/internals.h b/drivers/sh/intc/internals.h
index 6ce7f0d..4021c1c 100644
--- a/drivers/sh/intc/internals.h
+++ b/drivers/sh/intc/internals.h
@@ -4,7 +4,7 @@
 #include <linux/list.h>
 #include <linux/kernel.h>
 #include <linux/types.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 #include <linux/device.h>
 
 #define _INTC_MK(fn, mode, addr_e, addr_d, width, shift) \
-- 
2.7.4

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

* [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (11 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  2017-10-08 17:00   ` David Miller
  -1 siblings, 1 reply; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, linux-rdma, Yishai Hadas,
	Tariq Toukan, netdev

The headers
 - include/linux/mlx4/device.h
 - drivers/net/ethernet/mellanox/mlx4/mlx4.h
require the definition of struct radix_tree_root, but do not need to
know anything about other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the header dependency.

While we are here, let's add missing <linux/radix-tree.h> where
radix tree accessors are used.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/net/ethernet/mellanox/mlx4/cq.c   | 1 +
 drivers/net/ethernet/mellanox/mlx4/mlx4.h | 2 +-
 drivers/net/ethernet/mellanox/mlx4/qp.c   | 1 +
 drivers/net/ethernet/mellanox/mlx4/srq.c  | 1 +
 include/linux/mlx4/device.h               | 2 +-
 include/linux/mlx4/qp.h                   | 1 +
 6 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx4/cq.c b/drivers/net/ethernet/mellanox/mlx4/cq.c
index 72eb50c..4cbe65c 100644
--- a/drivers/net/ethernet/mellanox/mlx4/cq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/cq.c
@@ -36,6 +36,7 @@
 
 #include <linux/hardirq.h>
 #include <linux/export.h>
+#include <linux/radix-tree.h>
 
 #include <linux/mlx4/cmd.h>
 #include <linux/mlx4/cq.h>
diff --git a/drivers/net/ethernet/mellanox/mlx4/mlx4.h b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
index c68da19..975ef70 100644
--- a/drivers/net/ethernet/mellanox/mlx4/mlx4.h
+++ b/drivers/net/ethernet/mellanox/mlx4/mlx4.h
@@ -38,7 +38,7 @@
 #define MLX4_H
 
 #include <linux/mutex.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 #include <linux/rbtree.h>
 #include <linux/timer.h>
 #include <linux/semaphore.h>
diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c
index 728a2fb..50cbc62 100644
--- a/drivers/net/ethernet/mellanox/mlx4/qp.c
+++ b/drivers/net/ethernet/mellanox/mlx4/qp.c
@@ -35,6 +35,7 @@
 
 #include <linux/gfp.h>
 #include <linux/export.h>
+#include <linux/radix-tree.h>
 
 #include <linux/mlx4/cmd.h>
 #include <linux/mlx4/qp.h>
diff --git a/drivers/net/ethernet/mellanox/mlx4/srq.c b/drivers/net/ethernet/mellanox/mlx4/srq.c
index bedf521..4201a46 100644
--- a/drivers/net/ethernet/mellanox/mlx4/srq.c
+++ b/drivers/net/ethernet/mellanox/mlx4/srq.c
@@ -36,6 +36,7 @@
 #include <linux/mlx4/srq.h>
 #include <linux/export.h>
 #include <linux/gfp.h>
+#include <linux/radix-tree.h>
 
 #include "mlx4.h"
 #include "icm.h"
diff --git a/include/linux/mlx4/device.h b/include/linux/mlx4/device.h
index b0a57e0..75eac23 100644
--- a/include/linux/mlx4/device.h
+++ b/include/linux/mlx4/device.h
@@ -36,7 +36,7 @@
 #include <linux/if_ether.h>
 #include <linux/pci.h>
 #include <linux/completion.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 #include <linux/cpu_rmap.h>
 #include <linux/crash_dump.h>
 
diff --git a/include/linux/mlx4/qp.h b/include/linux/mlx4/qp.h
index 8e2828d..dfa7d8e 100644
--- a/include/linux/mlx4/qp.h
+++ b/include/linux/mlx4/qp.h
@@ -35,6 +35,7 @@
 
 #include <linux/types.h>
 #include <linux/if_ether.h>
+#include <linux/radix-tree.h>
 
 #include <linux/mlx4/device.h>
 
-- 
2.7.4

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

* [PATCH 11/12] net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (12 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  2017-10-08 17:00   ` David Miller
  -1 siblings, 1 reply; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, Matan Barak, linux-rdma, netdev,
	Saeed Mahameed, Leon Romanovsky

The header include/linux/mlx5/driver.h requires the definition of
struct radix_tree_root, but does not need to know anything about
other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the number of included header files.

Also, add <linux/radix-tree.h> to include/linux/mlx5/gp.h where radix
tree accessors are used.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 include/linux/mlx5/driver.h | 2 +-
 include/linux/mlx5/qp.h     | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/mlx5/driver.h b/include/linux/mlx5/driver.h
index 401c897..0aea568 100644
--- a/include/linux/mlx5/driver.h
+++ b/include/linux/mlx5/driver.h
@@ -40,7 +40,7 @@
 #include <linux/semaphore.h>
 #include <linux/slab.h>
 #include <linux/vmalloc.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 #include <linux/workqueue.h>
 #include <linux/mempool.h>
 #include <linux/interrupt.h>
diff --git a/include/linux/mlx5/qp.h b/include/linux/mlx5/qp.h
index 66d19b6..a90996f 100644
--- a/include/linux/mlx5/qp.h
+++ b/include/linux/mlx5/qp.h
@@ -35,6 +35,7 @@
 
 #include <linux/mlx5/device.h>
 #include <linux/mlx5/driver.h>
+#include <linux/radix-tree.h>
 
 #define MLX5_INVALID_LKEY	0x100
 #define MLX5_SIG_WQE_SIZE	(MLX5_SEND_WQE_BB * 5)
-- 
2.7.4

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

* [PATCH 12/12] drm/i915: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
                   ` (13 preceding siblings ...)
  (?)
@ 2017-10-08 16:10 ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 16:10 UTC (permalink / raw)
  To: linux-kernel
  Cc: Thomas Gleixner, Andrew Morton, Ian Abbott, Ingo Molnar,
	Linus Torvalds, Masahiro Yamada, Jani Nikula, intel-gfx,
	Rodrigo Vivi, dri-devel, David Airlie, Joonas Lahtinen

The header drivers/gpu/drm/i915/i915_gem_context.h requires the
definition of struct radix_tree_root, but does not need to know
anything about other radix tree stuff.

Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
reduce the number of included header files.

While we are here, let's add missing <linux/radix-tree.h> where
radix tree accessors are used.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/gpu/drm/i915/i915_gem.c            | 1 +
 drivers/gpu/drm/i915/i915_gem_context.c    | 1 +
 drivers/gpu/drm/i915/i915_gem_context.h    | 2 +-
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 1 +
 drivers/gpu/drm/i915/i915_gem_object.h     | 1 +
 5 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 19404c9..d2356eb 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -37,6 +37,7 @@
 #include "intel_mocs.h"
 #include <linux/dma-fence-array.h>
 #include <linux/kthread.h>
+#include <linux/radix-tree.h>
 #include <linux/reservation.h>
 #include <linux/shmem_fs.h>
 #include <linux/slab.h>
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c
index 58a2a44..34b2195 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/i915_gem_context.c
@@ -86,6 +86,7 @@
  */
 
 #include <linux/log2.h>
+#include <linux/radix-tree.h>
 #include <drm/drmP.h>
 #include <drm/i915_drm.h>
 #include "i915_drv.h"
diff --git a/drivers/gpu/drm/i915/i915_gem_context.h b/drivers/gpu/drm/i915/i915_gem_context.h
index 44688e2..0ebe11f 100644
--- a/drivers/gpu/drm/i915/i915_gem_context.h
+++ b/drivers/gpu/drm/i915/i915_gem_context.h
@@ -27,7 +27,7 @@
 
 #include <linux/bitops.h>
 #include <linux/list.h>
-#include <linux/radix-tree.h>
+#include <linux/radix-tree-root.h>
 
 struct pid;
 
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 92437f4..af9ee58 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -27,6 +27,7 @@
  */
 
 #include <linux/dma_remapping.h>
+#include <linux/radix-tree.h>
 #include <linux/reservation.h>
 #include <linux/sync_file.h>
 #include <linux/uaccess.h>
diff --git a/drivers/gpu/drm/i915/i915_gem_object.h b/drivers/gpu/drm/i915/i915_gem_object.h
index c30d8f8..a5a5506 100644
--- a/drivers/gpu/drm/i915/i915_gem_object.h
+++ b/drivers/gpu/drm/i915/i915_gem_object.h
@@ -25,6 +25,7 @@
 #ifndef __I915_GEM_OBJECT_H__
 #define __I915_GEM_OBJECT_H__
 
+#include <linux/radix-tree-root.h>
 #include <linux/reservation.h>
 
 #include <drm/drm_vma_manager.h>
-- 
2.7.4

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` [PATCH 10/12] net/mlx4: " Masahiro Yamada
@ 2017-10-08 17:00   ` David Miller
  2017-10-08 17:29     ` Masahiro Yamada
  0 siblings, 1 reply; 50+ messages in thread
From: David Miller @ 2017-10-08 17:00 UTC (permalink / raw)
  To: yamada.masahiro
  Cc: linux-kernel, tglx, akpm, abbotti, mingo, torvalds, linux-rdma,
	yishaih, tariqt, netdev

From: Masahiro Yamada <yamada.masahiro@socionext.com>
Date: Mon,  9 Oct 2017 01:10:11 +0900

> The headers
>  - include/linux/mlx4/device.h
>  - drivers/net/ethernet/mellanox/mlx4/mlx4.h
> require the definition of struct radix_tree_root, but do not need to
> know anything about other radix tree stuff.
> 
> Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
> reduce the header dependency.
> 
> While we are here, let's add missing <linux/radix-tree.h> where
> radix tree accessors are used.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Honestly this makes things more complicated.

The driver was trying to consolidate all of the header needs
by including them all in one place, the main driver header.

Now you're including headers in several different files.

I really don't like the results of this change and would
ask you to reconsider.

Just add both radix-tree-root.h _and_ radix-tree.h to mlx4.h
and leave the rest of the driver alone.

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

* Re: [PATCH 11/12] net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 16:10 ` [PATCH 11/12] net/mlx5: " Masahiro Yamada
@ 2017-10-08 17:00   ` David Miller
  0 siblings, 0 replies; 50+ messages in thread
From: David Miller @ 2017-10-08 17:00 UTC (permalink / raw)
  To: yamada.masahiro
  Cc: linux-kernel, tglx, akpm, abbotti, mingo, torvalds, matanb,
	linux-rdma, netdev, saeedm, leonro

From: Masahiro Yamada <yamada.masahiro@socionext.com>
Date: Mon,  9 Oct 2017 01:10:12 +0900

> The header include/linux/mlx5/driver.h requires the definition of
> struct radix_tree_root, but does not need to know anything about
> other radix tree stuff.
> 
> Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
> reduce the number of included header files.
> 
> Also, add <linux/radix-tree.h> to include/linux/mlx5/gp.h where radix
> tree accessors are used.
> 
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>

Same objections as the mlx4 changes, just include both headers in
driver.h

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 17:00   ` David Miller
@ 2017-10-08 17:29     ` Masahiro Yamada
  2017-10-08 17:32       ` Joe Perches
  2017-10-08 18:55       ` Leon Romanovsky
  0 siblings, 2 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-08 17:29 UTC (permalink / raw)
  To: David Miller
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	abbotti, Ingo Molnar, Linus Torvalds, linux-rdma, yishaih,
	tariqt, netdev

2017-10-09 2:00 GMT+09:00 David Miller <davem@davemloft.net>:
> From: Masahiro Yamada <yamada.masahiro@socionext.com>
> Date: Mon,  9 Oct 2017 01:10:11 +0900
>
>> The headers
>>  - include/linux/mlx4/device.h
>>  - drivers/net/ethernet/mellanox/mlx4/mlx4.h
>> require the definition of struct radix_tree_root, but do not need to
>> know anything about other radix tree stuff.
>>
>> Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
>> reduce the header dependency.
>>
>> While we are here, let's add missing <linux/radix-tree.h> where
>> radix tree accessors are used.
>>
>> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>
> Honestly this makes things more complicated.


The idea is simple; include necessary headers explicitly.

Putting everything into one common header
means most of C files are forced to parse unnecessary headers.



> The driver was trying to consolidate all of the header needs
> by including them all in one place, the main driver header.
>
> Now you're including headers in several different files.
>
> I really don't like the results of this change and would
> ask you to reconsider.
>
> Just add both radix-tree-root.h _and_ radix-tree.h to mlx4.h
> and leave the rest of the driver alone.


If you do not like this, you can just throw it away.

<linux/radix-tree.h> includes <linux/radix-tree-root.h>.
You do not need to include both.




-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 17:29     ` Masahiro Yamada
@ 2017-10-08 17:32       ` Joe Perches
       [not found]         ` <1507483942.11434.4.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
  2017-10-09 12:02         ` Masahiro Yamada
  2017-10-08 18:55       ` Leon Romanovsky
  1 sibling, 2 replies; 50+ messages in thread
From: Joe Perches @ 2017-10-08 17:32 UTC (permalink / raw)
  To: Masahiro Yamada, David Miller
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	abbotti, Ingo Molnar, Linus Torvalds, linux-rdma, yishaih,
	tariqt, netdev

On Mon, 2017-10-09 at 02:29 +0900, Masahiro Yamada wrote:
> The idea is simple; include necessary headers explicitly.

Try that for kernel.h

There's a reason aggregation of #includes is useful.

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
       [not found] ` <1507479013-5207-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
  2017-10-08 18:52     ` Leon Romanovsky
  (?)
@ 2017-10-08 18:52     ` Leon Romanovsky
  0 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-08 18:52 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner,
	Andrew Morton, Ian Abbott, Ingo Molnar, Linus Torvalds,
	linux-cachefs-H+wXaHxf7aLQT0dZR+AlfA,
	linux-sh-u79uwXL29TY76Z2rM5mHXA, Rodrigo Vivi,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, David Airlie,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yoshinori Sato, Tariq Toukan,
	Rich Felker, Jani Nikula, J. Bruce Fields, David Howells,
	intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Yishai Hadas,
	Joonas Lahtinen

[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]

On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:

<...>
>
> By splitting out the radix_tree_root definition,
> we can reduce the header file dependency.
>
> Reducing the header dependency will help for speeding the kernel
> build, suppressing unnecessary recompile of objects during
> git-bisect'ing, etc.

If we judge by the diffstat of this series, there won't be any
visible change in anything mentioned above.

<...>

>
> Masahiro Yamada (12):
>   radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h>
>   radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h>
>   irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   writeback: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   iocontext.h: replace <linux/radix-tree.h> with
>     <linux/radix-tree-root.h>
>   fs: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   blkcg: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   fscache: include <linux-radix-tree.h>
>   sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   drm/i915: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>
>  drivers/gpu/drm/i915/i915_gem.c            |  1 +
>  drivers/gpu/drm/i915/i915_gem_context.c    |  1 +
>  drivers/gpu/drm/i915/i915_gem_context.h    |  2 +-
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c |  1 +
>  drivers/gpu/drm/i915/i915_gem_object.h     |  1 +
>  drivers/net/ethernet/mellanox/mlx4/cq.c    |  1 +
>  drivers/net/ethernet/mellanox/mlx4/mlx4.h  |  2 +-
>  drivers/net/ethernet/mellanox/mlx4/qp.c    |  1 +
>  drivers/net/ethernet/mellanox/mlx4/srq.c   |  1 +
>  drivers/sh/intc/internals.h                |  2 +-
>  include/linux/backing-dev-defs.h           |  2 +-
>  include/linux/blk-cgroup.h                 |  2 +-
>  include/linux/fs.h                         |  2 +-
>  include/linux/fscache.h                    |  1 +
>  include/linux/iocontext.h                  |  2 +-
>  include/linux/irqdomain.h                  |  2 +-
>  include/linux/mlx4/device.h                |  2 +-
>  include/linux/mlx4/qp.h                    |  1 +
>  include/linux/mlx5/driver.h                |  2 +-
>  include/linux/mlx5/qp.h                    |  1 +
>  include/linux/radix-tree-root.h            | 24 ++++++++++++++++++++++++
>  include/linux/radix-tree.h                 |  8 ++------
>  22 files changed, 46 insertions(+), 16 deletions(-)
>  create mode 100644 include/linux/radix-tree-root.h
>
> --
> 2.7.4
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-08 18:52     ` Leon Romanovsky
  0 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-08 18:52 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner,
	Andrew Morton, Ian Abbott, Ingo Molnar, Linus Torvalds,
	linux-cachefs-H+wXaHxf7aLQT0dZR+AlfA,
	linux-sh-u79uwXL29TY76Z2rM5mHXA, Rodrigo Vivi,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, David Airlie,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yoshinori Sato, Tariq Toukan,
	Rich Felker, Jani Nikula, J. Bruce Fields, David Howells,
	intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Yishai Hadas,
	Joonas Lahtinen

[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]

On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:

<...>
>
> By splitting out the radix_tree_root definition,
> we can reduce the header file dependency.
>
> Reducing the header dependency will help for speeding the kernel
> build, suppressing unnecessary recompile of objects during
> git-bisect'ing, etc.

If we judge by the diffstat of this series, there won't be any
visible change in anything mentioned above.

<...>

>
> Masahiro Yamada (12):
>   radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h>
>   radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h>
>   irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   writeback: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   iocontext.h: replace <linux/radix-tree.h> with
>     <linux/radix-tree-root.h>
>   fs: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   blkcg: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   fscache: include <linux-radix-tree.h>
>   sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   drm/i915: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>
>  drivers/gpu/drm/i915/i915_gem.c            |  1 +
>  drivers/gpu/drm/i915/i915_gem_context.c    |  1 +
>  drivers/gpu/drm/i915/i915_gem_context.h    |  2 +-
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c |  1 +
>  drivers/gpu/drm/i915/i915_gem_object.h     |  1 +
>  drivers/net/ethernet/mellanox/mlx4/cq.c    |  1 +
>  drivers/net/ethernet/mellanox/mlx4/mlx4.h  |  2 +-
>  drivers/net/ethernet/mellanox/mlx4/qp.c    |  1 +
>  drivers/net/ethernet/mellanox/mlx4/srq.c   |  1 +
>  drivers/sh/intc/internals.h                |  2 +-
>  include/linux/backing-dev-defs.h           |  2 +-
>  include/linux/blk-cgroup.h                 |  2 +-
>  include/linux/fs.h                         |  2 +-
>  include/linux/fscache.h                    |  1 +
>  include/linux/iocontext.h                  |  2 +-
>  include/linux/irqdomain.h                  |  2 +-
>  include/linux/mlx4/device.h                |  2 +-
>  include/linux/mlx4/qp.h                    |  1 +
>  include/linux/mlx5/driver.h                |  2 +-
>  include/linux/mlx5/qp.h                    |  1 +
>  include/linux/radix-tree-root.h            | 24 ++++++++++++++++++++++++
>  include/linux/radix-tree.h                 |  8 ++------
>  22 files changed, 46 insertions(+), 16 deletions(-)
>  create mode 100644 include/linux/radix-tree-root.h
>
> --
> 2.7.4
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-08 18:52     ` Leon Romanovsky
  0 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-08 18:52 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kernel, Thomas Gleixner, Andrew Morton, Ian Abbott,
	Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Jani Nikula,
	J. Bruce Fields, David Howells, intel-gfx, Yishai Hadas,
	Joonas Lahtinen, Matan Barak, netdev, Saeed Mahameed,
	Jeff Layton, linux-fsdevel, Marc Zyngier

[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]

On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:

<...>
>
> By splitting out the radix_tree_root definition,
> we can reduce the header file dependency.
>
> Reducing the header dependency will help for speeding the kernel
> build, suppressing unnecessary recompile of objects during
> git-bisect'ing, etc.

If we judge by the diffstat of this series, there won't be any
visible change in anything mentioned above.

<...>

>
> Masahiro Yamada (12):
>   radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h>
>   radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h>
>   irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   writeback: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   iocontext.h: replace <linux/radix-tree.h> with
>     <linux/radix-tree-root.h>
>   fs: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   blkcg: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   fscache: include <linux-radix-tree.h>
>   sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   drm/i915: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>
>  drivers/gpu/drm/i915/i915_gem.c            |  1 +
>  drivers/gpu/drm/i915/i915_gem_context.c    |  1 +
>  drivers/gpu/drm/i915/i915_gem_context.h    |  2 +-
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c |  1 +
>  drivers/gpu/drm/i915/i915_gem_object.h     |  1 +
>  drivers/net/ethernet/mellanox/mlx4/cq.c    |  1 +
>  drivers/net/ethernet/mellanox/mlx4/mlx4.h  |  2 +-
>  drivers/net/ethernet/mellanox/mlx4/qp.c    |  1 +
>  drivers/net/ethernet/mellanox/mlx4/srq.c   |  1 +
>  drivers/sh/intc/internals.h                |  2 +-
>  include/linux/backing-dev-defs.h           |  2 +-
>  include/linux/blk-cgroup.h                 |  2 +-
>  include/linux/fs.h                         |  2 +-
>  include/linux/fscache.h                    |  1 +
>  include/linux/iocontext.h                  |  2 +-
>  include/linux/irqdomain.h                  |  2 +-
>  include/linux/mlx4/device.h                |  2 +-
>  include/linux/mlx4/qp.h                    |  1 +
>  include/linux/mlx5/driver.h                |  2 +-
>  include/linux/mlx5/qp.h                    |  1 +
>  include/linux/radix-tree-root.h            | 24 ++++++++++++++++++++++++
>  include/linux/radix-tree.h                 |  8 ++------
>  22 files changed, 46 insertions(+), 16 deletions(-)
>  create mode 100644 include/linux/radix-tree-root.h
>
> --
> 2.7.4
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-08 18:52     ` Leon Romanovsky
  0 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-08 18:52 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA, Thomas Gleixner,
	Andrew Morton, Ian Abbott, Ingo Molnar, Linus Torvalds,
	linux-cachefs-H+wXaHxf7aLQT0dZR+AlfA,
	linux-sh-u79uwXL29TY76Z2rM5mHXA, Rodrigo Vivi,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, David Airlie,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA, Yoshinori Sato, Tariq Toukan,
	Rich Felker, Jani Nikula, J. Bruce Fields, David Howells,
	intel-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Yishai Hadas,
	Joonas Lahtinen

[-- Attachment #1: Type: text/plain, Size: 2655 bytes --]

On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:

<...>
>
> By splitting out the radix_tree_root definition,
> we can reduce the header file dependency.
>
> Reducing the header dependency will help for speeding the kernel
> build, suppressing unnecessary recompile of objects during
> git-bisect'ing, etc.

If we judge by the diffstat of this series, there won't be any
visible change in anything mentioned above.

<...>

>
> Masahiro Yamada (12):
>   radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h>
>   radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h>
>   irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   writeback: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   iocontext.h: replace <linux/radix-tree.h> with
>     <linux/radix-tree-root.h>
>   fs: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   blkcg: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   fscache: include <linux-radix-tree.h>
>   sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   net/mlx5: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>   drm/i915: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
>
>  drivers/gpu/drm/i915/i915_gem.c            |  1 +
>  drivers/gpu/drm/i915/i915_gem_context.c    |  1 +
>  drivers/gpu/drm/i915/i915_gem_context.h    |  2 +-
>  drivers/gpu/drm/i915/i915_gem_execbuffer.c |  1 +
>  drivers/gpu/drm/i915/i915_gem_object.h     |  1 +
>  drivers/net/ethernet/mellanox/mlx4/cq.c    |  1 +
>  drivers/net/ethernet/mellanox/mlx4/mlx4.h  |  2 +-
>  drivers/net/ethernet/mellanox/mlx4/qp.c    |  1 +
>  drivers/net/ethernet/mellanox/mlx4/srq.c   |  1 +
>  drivers/sh/intc/internals.h                |  2 +-
>  include/linux/backing-dev-defs.h           |  2 +-
>  include/linux/blk-cgroup.h                 |  2 +-
>  include/linux/fs.h                         |  2 +-
>  include/linux/fscache.h                    |  1 +
>  include/linux/iocontext.h                  |  2 +-
>  include/linux/irqdomain.h                  |  2 +-
>  include/linux/mlx4/device.h                |  2 +-
>  include/linux/mlx4/qp.h                    |  1 +
>  include/linux/mlx5/driver.h                |  2 +-
>  include/linux/mlx5/qp.h                    |  1 +
>  include/linux/radix-tree-root.h            | 24 ++++++++++++++++++++++++
>  include/linux/radix-tree.h                 |  8 ++------
>  22 files changed, 46 insertions(+), 16 deletions(-)
>  create mode 100644 include/linux/radix-tree-root.h
>
> --
> 2.7.4
>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 17:29     ` Masahiro Yamada
  2017-10-08 17:32       ` Joe Perches
@ 2017-10-08 18:55       ` Leon Romanovsky
  2017-10-09  5:56         ` Masahiro Yamada
  1 sibling, 1 reply; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-08 18:55 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: David Miller, Linux Kernel Mailing List, Thomas Gleixner,
	Andrew Morton, abbotti, Ingo Molnar, Linus Torvalds, linux-rdma,
	yishaih, tariqt, netdev

[-- Attachment #1: Type: text/plain, Size: 1951 bytes --]

On Mon, Oct 09, 2017 at 02:29:15AM +0900, Masahiro Yamada wrote:
> 2017-10-09 2:00 GMT+09:00 David Miller <davem@davemloft.net>:
> > From: Masahiro Yamada <yamada.masahiro@socionext.com>
> > Date: Mon,  9 Oct 2017 01:10:11 +0900
> >
> >> The headers
> >>  - include/linux/mlx4/device.h
> >>  - drivers/net/ethernet/mellanox/mlx4/mlx4.h
> >> require the definition of struct radix_tree_root, but do not need to
> >> know anything about other radix tree stuff.
> >>
> >> Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
> >> reduce the header dependency.
> >>
> >> While we are here, let's add missing <linux/radix-tree.h> where
> >> radix tree accessors are used.
> >>
> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >
> > Honestly this makes things more complicated.
>
>
> The idea is simple; include necessary headers explicitly.
>
> Putting everything into one common header
> means most of C files are forced to parse unnecessary headers.

It is neglected, only first caller will actually parse that header file,
other callers will check the #ifndef pragma without need to reparse the
whole file.

>
>
>
> > The driver was trying to consolidate all of the header needs
> > by including them all in one place, the main driver header.
> >
> > Now you're including headers in several different files.
> >
> > I really don't like the results of this change and would
> > ask you to reconsider.
> >
> > Just add both radix-tree-root.h _and_ radix-tree.h to mlx4.h
> > and leave the rest of the driver alone.
>
>
> If you do not like this, you can just throw it away.
>
> <linux/radix-tree.h> includes <linux/radix-tree-root.h>.
> You do not need to include both.
>
>
>
>
> --
> Best Regards
> Masahiro Yamada
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 17:32       ` Joe Perches
@ 2017-10-09  5:55             ` Masahiro Yamada
  2017-10-09 12:02         ` Masahiro Yamada
  1 sibling, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-09  5:55 UTC (permalink / raw)
  To: Joe Perches
  Cc: David Miller, Linux Kernel Mailing List, Thomas Gleixner,
	Andrew Morton, Ian Abbott, Ingo Molnar, Linus Torvalds,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	yishaih-VPRAkNaXOzVWk0Htik3J/w, tariqt-VPRAkNaXOzVWk0Htik3J/w,
	netdev-u79uwXL29TY76Z2rM5mHXA

2017-10-09 2:32 GMT+09:00 Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>:
> On Mon, 2017-10-09 at 02:29 +0900, Masahiro Yamada wrote:
>> The idea is simple; include necessary headers explicitly.
>
> Try that for kernel.h
>
> There's a reason aggregation of #includes is useful.
>


We should use a common sense for the balance between
  - aggregation of #includes
  - reduce the number of parsed headers


As I had already said, if you do not like this change, you can just
throw it away.

That's fine because the impact is very limited.
Honestly, I am not so interested in this driver.
I changed sh,  net/mlx4, net/mlx5, drm/i915 for bonus while I am here.


I assume your objection is addressed to this driver change,
not the whole series.


I am more interested in the global headers like
include/linux/{irqdomain.h, fs.h} etc.


radix-tree-root.h vs radix-tree.h
has a big difference in terms of parsed headers (17 vs 128).

For example, the following is the analysis on arm64.



<linux/radix-tree-root.h> include the following 17 headers:

  include/linux/radix-tree-root.h \
  include/linux/types.h \
  include/uapi/linux/types.h \
  arch/arm64/include/generated/uapi/asm/types.h \
  include/uapi/asm-generic/types.h \
  include/asm-generic/int-ll64.h \
  include/uapi/asm-generic/int-ll64.h \
  arch/arm64/include/uapi/asm/bitsperlong.h \
  include/asm-generic/bitsperlong.h \
  include/uapi/asm-generic/bitsperlong.h \
  include/uapi/linux/posix_types.h \
  include/linux/stddef.h \
  include/uapi/linux/stddef.h \
  include/linux/compiler.h \
  include/linux/compiler-gcc.h \
  arch/arm64/include/uapi/asm/posix_types.h \
  include/uapi/asm-generic/posix_types.h \




<linux/radix-tree.h> include the following 128 headers:

  include/linux/radix-tree.h \
  include/linux/bitops.h \
  arch/arm64/include/generated/uapi/asm/types.h \
  include/uapi/asm-generic/types.h \
  include/asm-generic/int-ll64.h \
  include/uapi/asm-generic/int-ll64.h \
  arch/arm64/include/uapi/asm/bitsperlong.h \
  include/asm-generic/bitsperlong.h \
  include/uapi/asm-generic/bitsperlong.h \
  arch/arm64/include/asm/bitops.h \
  include/linux/compiler.h \
  include/linux/compiler-gcc.h \
  include/uapi/linux/types.h \
  include/uapi/linux/posix_types.h \
  include/linux/stddef.h \
  include/uapi/linux/stddef.h \
  arch/arm64/include/uapi/asm/posix_types.h \
  include/uapi/asm-generic/posix_types.h \
  arch/arm64/include/asm/barrier.h \
  include/asm-generic/barrier.h \
  include/asm-generic/bitops/builtin-__ffs.h \
  include/asm-generic/bitops/builtin-ffs.h \
  include/asm-generic/bitops/builtin-__fls.h \
  include/asm-generic/bitops/builtin-fls.h \
  include/asm-generic/bitops/ffz.h \
  include/asm-generic/bitops/fls64.h \
  include/asm-generic/bitops/find.h \
  include/asm-generic/bitops/sched.h \
  include/asm-generic/bitops/hweight.h \
  include/asm-generic/bitops/arch_hweight.h \
  include/asm-generic/bitops/const_hweight.h \
  include/asm-generic/bitops/lock.h \
  include/asm-generic/bitops/non-atomic.h \
  include/asm-generic/bitops/le.h \
  arch/arm64/include/uapi/asm/byteorder.h \
  include/linux/byteorder/big_endian.h \
  include/uapi/linux/byteorder/big_endian.h \
  include/linux/types.h \
  include/linux/swab.h \
  include/uapi/linux/swab.h \
  arch/arm64/include/generated/uapi/asm/swab.h \
  include/uapi/asm-generic/swab.h \
  include/linux/byteorder/generic.h \
  include/linux/bug.h \
  arch/arm64/include/asm/bug.h \
  include/linux/stringify.h \
  arch/arm64/include/asm/asm-bug.h \
  arch/arm64/include/asm/brk-imm.h \
  include/asm-generic/bug.h \
  include/linux/kernel.h \
  /home/masahiro/toolchains/aarch64-linaro-4.9/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/4.9.4/include/stdarg.h
\
  include/linux/linkage.h \
  include/linux/export.h \
  arch/arm64/include/asm/linkage.h \
  include/linux/log2.h \
  include/linux/typecheck.h \
  include/linux/printk.h \
  include/linux/init.h \
  include/linux/kern_levels.h \
  include/linux/cache.h \
  include/uapi/linux/kernel.h \
  include/uapi/linux/sysinfo.h \
  arch/arm64/include/asm/cache.h \
  arch/arm64/include/asm/cputype.h \
  arch/arm64/include/asm/sysreg.h \
  include/linux/dynamic_debug.h \
  include/linux/jump_label.h \
  arch/arm64/include/asm/jump_label.h \
  arch/arm64/include/asm/insn.h \
  include/linux/build_bug.h \
  include/linux/list.h \
  include/linux/poison.h \
  include/uapi/linux/const.h \
  include/linux/preempt.h \
  arch/arm64/include/generated/asm/preempt.h \
  include/asm-generic/preempt.h \
  include/linux/thread_info.h \
  include/linux/restart_block.h \
  arch/arm64/include/asm/current.h \
  arch/arm64/include/asm/thread_info.h \
  arch/arm64/include/asm/memory.h \
  arch/arm64/include/asm/page-def.h \
  arch/arm64/include/generated/asm/sizes.h \
  include/asm-generic/sizes.h \
  include/linux/sizes.h \
  include/linux/mmdebug.h \
  include/asm-generic/memory_model.h \
  include/linux/pfn.h \
  arch/arm64/include/asm/stack_pointer.h \
  include/linux/radix-tree-root.h \
  include/linux/rcupdate.h \
  include/linux/atomic.h \
  arch/arm64/include/asm/atomic.h \
  arch/arm64/include/asm/lse.h \
  arch/arm64/include/asm/atomic_ll_sc.h \
  arch/arm64/include/asm/cmpxchg.h \
  include/asm-generic/atomic-long.h \
  include/linux/irqflags.h \
  arch/arm64/include/asm/irqflags.h \
  arch/arm64/include/asm/ptrace.h \
  arch/arm64/include/uapi/asm/ptrace.h \
  arch/arm64/include/asm/hwcap.h \
  arch/arm64/include/uapi/asm/hwcap.h \
  include/asm-generic/ptrace.h \
  include/linux/bottom_half.h \
  include/linux/lockdep.h \
  include/linux/debug_locks.h \
  include/linux/stacktrace.h \
  arch/arm64/include/asm/processor.h \
  include/linux/string.h \
  include/uapi/linux/string.h \
  arch/arm64/include/asm/string.h \
  arch/arm64/include/asm/alternative.h \
  arch/arm64/include/asm/cpucaps.h \
  arch/arm64/include/asm/fpsimd.h \
  arch/arm64/include/asm/hw_breakpoint.h \
  arch/arm64/include/asm/cpufeature.h \
  arch/arm64/include/asm/virt.h \
  arch/arm64/include/asm/sections.h \
  include/asm-generic/sections.h \
  arch/arm64/include/asm/pgtable-hwdef.h \
  include/linux/cpumask.h \
  include/linux/threads.h \
  include/linux/bitmap.h \
  include/linux/rcutree.h \
  include/linux/spinlock_types.h \
  arch/arm64/include/asm/spinlock_types.h \
  include/linux/rwlock_types.h \





-- 
Best Regards
Masahiro Yamada
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
@ 2017-10-09  5:55             ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-09  5:55 UTC (permalink / raw)
  To: Joe Perches
  Cc: David Miller, Linux Kernel Mailing List, Thomas Gleixner,
	Andrew Morton, Ian Abbott, Ingo Molnar, Linus Torvalds,
	linux-rdma, yishaih, tariqt, netdev

2017-10-09 2:32 GMT+09:00 Joe Perches <joe@perches.com>:
> On Mon, 2017-10-09 at 02:29 +0900, Masahiro Yamada wrote:
>> The idea is simple; include necessary headers explicitly.
>
> Try that for kernel.h
>
> There's a reason aggregation of #includes is useful.
>


We should use a common sense for the balance between
  - aggregation of #includes
  - reduce the number of parsed headers


As I had already said, if you do not like this change, you can just
throw it away.

That's fine because the impact is very limited.
Honestly, I am not so interested in this driver.
I changed sh,  net/mlx4, net/mlx5, drm/i915 for bonus while I am here.


I assume your objection is addressed to this driver change,
not the whole series.


I am more interested in the global headers like
include/linux/{irqdomain.h, fs.h} etc.


radix-tree-root.h vs radix-tree.h
has a big difference in terms of parsed headers (17 vs 128).

For example, the following is the analysis on arm64.



<linux/radix-tree-root.h> include the following 17 headers:

  include/linux/radix-tree-root.h \
  include/linux/types.h \
  include/uapi/linux/types.h \
  arch/arm64/include/generated/uapi/asm/types.h \
  include/uapi/asm-generic/types.h \
  include/asm-generic/int-ll64.h \
  include/uapi/asm-generic/int-ll64.h \
  arch/arm64/include/uapi/asm/bitsperlong.h \
  include/asm-generic/bitsperlong.h \
  include/uapi/asm-generic/bitsperlong.h \
  include/uapi/linux/posix_types.h \
  include/linux/stddef.h \
  include/uapi/linux/stddef.h \
  include/linux/compiler.h \
  include/linux/compiler-gcc.h \
  arch/arm64/include/uapi/asm/posix_types.h \
  include/uapi/asm-generic/posix_types.h \




<linux/radix-tree.h> include the following 128 headers:

  include/linux/radix-tree.h \
  include/linux/bitops.h \
  arch/arm64/include/generated/uapi/asm/types.h \
  include/uapi/asm-generic/types.h \
  include/asm-generic/int-ll64.h \
  include/uapi/asm-generic/int-ll64.h \
  arch/arm64/include/uapi/asm/bitsperlong.h \
  include/asm-generic/bitsperlong.h \
  include/uapi/asm-generic/bitsperlong.h \
  arch/arm64/include/asm/bitops.h \
  include/linux/compiler.h \
  include/linux/compiler-gcc.h \
  include/uapi/linux/types.h \
  include/uapi/linux/posix_types.h \
  include/linux/stddef.h \
  include/uapi/linux/stddef.h \
  arch/arm64/include/uapi/asm/posix_types.h \
  include/uapi/asm-generic/posix_types.h \
  arch/arm64/include/asm/barrier.h \
  include/asm-generic/barrier.h \
  include/asm-generic/bitops/builtin-__ffs.h \
  include/asm-generic/bitops/builtin-ffs.h \
  include/asm-generic/bitops/builtin-__fls.h \
  include/asm-generic/bitops/builtin-fls.h \
  include/asm-generic/bitops/ffz.h \
  include/asm-generic/bitops/fls64.h \
  include/asm-generic/bitops/find.h \
  include/asm-generic/bitops/sched.h \
  include/asm-generic/bitops/hweight.h \
  include/asm-generic/bitops/arch_hweight.h \
  include/asm-generic/bitops/const_hweight.h \
  include/asm-generic/bitops/lock.h \
  include/asm-generic/bitops/non-atomic.h \
  include/asm-generic/bitops/le.h \
  arch/arm64/include/uapi/asm/byteorder.h \
  include/linux/byteorder/big_endian.h \
  include/uapi/linux/byteorder/big_endian.h \
  include/linux/types.h \
  include/linux/swab.h \
  include/uapi/linux/swab.h \
  arch/arm64/include/generated/uapi/asm/swab.h \
  include/uapi/asm-generic/swab.h \
  include/linux/byteorder/generic.h \
  include/linux/bug.h \
  arch/arm64/include/asm/bug.h \
  include/linux/stringify.h \
  arch/arm64/include/asm/asm-bug.h \
  arch/arm64/include/asm/brk-imm.h \
  include/asm-generic/bug.h \
  include/linux/kernel.h \
  /home/masahiro/toolchains/aarch64-linaro-4.9/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/lib/gcc/aarch64-linux-gnu/4.9.4/include/stdarg.h
\
  include/linux/linkage.h \
  include/linux/export.h \
  arch/arm64/include/asm/linkage.h \
  include/linux/log2.h \
  include/linux/typecheck.h \
  include/linux/printk.h \
  include/linux/init.h \
  include/linux/kern_levels.h \
  include/linux/cache.h \
  include/uapi/linux/kernel.h \
  include/uapi/linux/sysinfo.h \
  arch/arm64/include/asm/cache.h \
  arch/arm64/include/asm/cputype.h \
  arch/arm64/include/asm/sysreg.h \
  include/linux/dynamic_debug.h \
  include/linux/jump_label.h \
  arch/arm64/include/asm/jump_label.h \
  arch/arm64/include/asm/insn.h \
  include/linux/build_bug.h \
  include/linux/list.h \
  include/linux/poison.h \
  include/uapi/linux/const.h \
  include/linux/preempt.h \
  arch/arm64/include/generated/asm/preempt.h \
  include/asm-generic/preempt.h \
  include/linux/thread_info.h \
  include/linux/restart_block.h \
  arch/arm64/include/asm/current.h \
  arch/arm64/include/asm/thread_info.h \
  arch/arm64/include/asm/memory.h \
  arch/arm64/include/asm/page-def.h \
  arch/arm64/include/generated/asm/sizes.h \
  include/asm-generic/sizes.h \
  include/linux/sizes.h \
  include/linux/mmdebug.h \
  include/asm-generic/memory_model.h \
  include/linux/pfn.h \
  arch/arm64/include/asm/stack_pointer.h \
  include/linux/radix-tree-root.h \
  include/linux/rcupdate.h \
  include/linux/atomic.h \
  arch/arm64/include/asm/atomic.h \
  arch/arm64/include/asm/lse.h \
  arch/arm64/include/asm/atomic_ll_sc.h \
  arch/arm64/include/asm/cmpxchg.h \
  include/asm-generic/atomic-long.h \
  include/linux/irqflags.h \
  arch/arm64/include/asm/irqflags.h \
  arch/arm64/include/asm/ptrace.h \
  arch/arm64/include/uapi/asm/ptrace.h \
  arch/arm64/include/asm/hwcap.h \
  arch/arm64/include/uapi/asm/hwcap.h \
  include/asm-generic/ptrace.h \
  include/linux/bottom_half.h \
  include/linux/lockdep.h \
  include/linux/debug_locks.h \
  include/linux/stacktrace.h \
  arch/arm64/include/asm/processor.h \
  include/linux/string.h \
  include/uapi/linux/string.h \
  arch/arm64/include/asm/string.h \
  arch/arm64/include/asm/alternative.h \
  arch/arm64/include/asm/cpucaps.h \
  arch/arm64/include/asm/fpsimd.h \
  arch/arm64/include/asm/hw_breakpoint.h \
  arch/arm64/include/asm/cpufeature.h \
  arch/arm64/include/asm/virt.h \
  arch/arm64/include/asm/sections.h \
  include/asm-generic/sections.h \
  arch/arm64/include/asm/pgtable-hwdef.h \
  include/linux/cpumask.h \
  include/linux/threads.h \
  include/linux/bitmap.h \
  include/linux/rcutree.h \
  include/linux/spinlock_types.h \
  arch/arm64/include/asm/spinlock_types.h \
  include/linux/rwlock_types.h \





-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 18:55       ` Leon Romanovsky
@ 2017-10-09  5:56         ` Masahiro Yamada
       [not found]           ` <CAK7LNARAhAaO+YjqXyBbi=-udCu8zzGnLMsoVNdkSXtXPuMKsA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-09  5:56 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: David Miller, Linux Kernel Mailing List, Thomas Gleixner,
	Andrew Morton, Ian Abbott, Ingo Molnar, Linus Torvalds,
	linux-rdma, yishaih, tariqt, netdev

2017-10-09 3:55 GMT+09:00 Leon Romanovsky <leon@kernel.org>:
> On Mon, Oct 09, 2017 at 02:29:15AM +0900, Masahiro Yamada wrote:
>> 2017-10-09 2:00 GMT+09:00 David Miller <davem@davemloft.net>:
>> > From: Masahiro Yamada <yamada.masahiro@socionext.com>
>> > Date: Mon,  9 Oct 2017 01:10:11 +0900
>> >
>> >> The headers
>> >>  - include/linux/mlx4/device.h
>> >>  - drivers/net/ethernet/mellanox/mlx4/mlx4.h
>> >> require the definition of struct radix_tree_root, but do not need to
>> >> know anything about other radix tree stuff.
>> >>
>> >> Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
>> >> reduce the header dependency.
>> >>
>> >> While we are here, let's add missing <linux/radix-tree.h> where
>> >> radix tree accessors are used.
>> >>
>> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
>> >
>> > Honestly this makes things more complicated.
>>
>>
>> The idea is simple; include necessary headers explicitly.
>>
>> Putting everything into one common header
>> means most of C files are forced to parse unnecessary headers.
>
> It is neglected, only first caller will actually parse that header file,
> other callers will check the #ifndef pragma without need to reparse the
> whole file.
>


You completely neglected the point of the discussion.

I am trying to not include unnecessary headers at all.




-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
  2017-10-08 18:52     ` Leon Romanovsky
  (?)
  (?)
@ 2017-10-09  5:58       ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-09  5:58 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Jani Nikula,
	J. Bruce Fields, David Howells, intel-gfx, Yishai Hadas, Joonas

2017-10-09 3:52 GMT+09:00 Leon Romanovsky <leonro@mellanox.com>:
> On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
>
> <...>
>>
>> By splitting out the radix_tree_root definition,
>> we can reduce the header file dependency.
>>
>> Reducing the header dependency will help for speeding the kernel
>> build, suppressing unnecessary recompile of objects during
>> git-bisect'ing, etc.
>
> If we judge by the diffstat of this series, there won't be any
> visible change in anything mentioned above.


Of course, judging by the diffstat is wrong.



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-09  5:58       ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-09  5:58 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Jani Nikula,
	J. Bruce Fields, David Howells, intel-gfx, Yishai Hadas, Joonas

2017-10-09 3:52 GMT+09:00 Leon Romanovsky <leonro@mellanox.com>:
> On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
>
> <...>
>>
>> By splitting out the radix_tree_root definition,
>> we can reduce the header file dependency.
>>
>> Reducing the header dependency will help for speeding the kernel
>> build, suppressing unnecessary recompile of objects during
>> git-bisect'ing, etc.
>
> If we judge by the diffstat of this series, there won't be any
> visible change in anything mentioned above.


Of course, judging by the diffstat is wrong.



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-09  5:58       ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-09  5:58 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Jani Nikula,
	J. Bruce Fields, David Howells, intel-gfx, Yishai Hadas,
	Joonas Lahtinen, Matan Barak, netdev, Saeed Mahameed,
	Jeff Layton, linux-fsdevel, Marc Zyngier

2017-10-09 3:52 GMT+09:00 Leon Romanovsky <leonro@mellanox.com>:
> On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
>
> <...>
>>
>> By splitting out the radix_tree_root definition,
>> we can reduce the header file dependency.
>>
>> Reducing the header dependency will help for speeding the kernel
>> build, suppressing unnecessary recompile of objects during
>> git-bisect'ing, etc.
>
> If we judge by the diffstat of this series, there won't be any
> visible change in anything mentioned above.


Of course, judging by the diffstat is wrong.



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-09  5:58       ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-09  5:58 UTC (permalink / raw)
  To: Leon Romanovsky
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Jani Nikula,
	J. Bruce Fields, David Howells, intel-gfx, Yishai Hadas, Joonas

2017-10-09 3:52 GMT+09:00 Leon Romanovsky <leonro@mellanox.com>:
> On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
>
> <...>
>>
>> By splitting out the radix_tree_root definition,
>> we can reduce the header file dependency.
>>
>> Reducing the header dependency will help for speeding the kernel
>> build, suppressing unnecessary recompile of objects during
>> git-bisect'ing, etc.
>
> If we judge by the diffstat of this series, there won't be any
> visible change in anything mentioned above.


Of course, judging by the diffstat is wrong.



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
  2017-10-09  5:58       ` Masahiro Yamada
  (?)
  (?)
@ 2017-10-09  6:05         ` Leon Romanovsky
  -1 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-09  6:05 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Jani Nikula,
	J. Bruce Fields, David Howells, intel-gfx, Yishai Hadas, Joonas

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

On Mon, Oct 09, 2017 at 02:58:58PM +0900, Masahiro Yamada wrote:
> 2017-10-09 3:52 GMT+09:00 Leon Romanovsky <leonro@mellanox.com>:
> > On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
> >
> > <...>
> >>
> >> By splitting out the radix_tree_root definition,
> >> we can reduce the header file dependency.
> >>
> >> Reducing the header dependency will help for speeding the kernel
> >> build, suppressing unnecessary recompile of objects during
> >> git-bisect'ing, etc.
> >
> > If we judge by the diffstat of this series, there won't be any
> > visible change in anything mentioned above.
>
>
> Of course, judging by the diffstat is wrong.
>

I'm more than happy to be wrong and you for sure can help me.
Can you provide any quantitative support of your claims?

Thanks

>
>
> --
> Best Regards
> Masahiro Yamada
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-09  6:05         ` Leon Romanovsky
  0 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-09  6:05 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Jani Nikula,
	J. Bruce Fields, David Howells, intel-gfx, Yishai Hadas, Joonas

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

On Mon, Oct 09, 2017 at 02:58:58PM +0900, Masahiro Yamada wrote:
> 2017-10-09 3:52 GMT+09:00 Leon Romanovsky <leonro@mellanox.com>:
> > On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
> >
> > <...>
> >>
> >> By splitting out the radix_tree_root definition,
> >> we can reduce the header file dependency.
> >>
> >> Reducing the header dependency will help for speeding the kernel
> >> build, suppressing unnecessary recompile of objects during
> >> git-bisect'ing, etc.
> >
> > If we judge by the diffstat of this series, there won't be any
> > visible change in anything mentioned above.
>
>
> Of course, judging by the diffstat is wrong.
>

I'm more than happy to be wrong and you for sure can help me.
Can you provide any quantitative support of your claims?

Thanks

>
>
> --
> Best Regards
> Masahiro Yamada
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-09  6:05         ` Leon Romanovsky
  0 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-09  6:05 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Jani Nikula,
	J. Bruce Fields, David Howells, intel-gfx, Yishai Hadas,
	Joonas Lahtinen, Matan Barak, netdev, Saeed Mahameed,
	Jeff Layton, linux-fsdevel, Marc Zyngier

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

On Mon, Oct 09, 2017 at 02:58:58PM +0900, Masahiro Yamada wrote:
> 2017-10-09 3:52 GMT+09:00 Leon Romanovsky <leonro@mellanox.com>:
> > On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
> >
> > <...>
> >>
> >> By splitting out the radix_tree_root definition,
> >> we can reduce the header file dependency.
> >>
> >> Reducing the header dependency will help for speeding the kernel
> >> build, suppressing unnecessary recompile of objects during
> >> git-bisect'ing, etc.
> >
> > If we judge by the diffstat of this series, there won't be any
> > visible change in anything mentioned above.
>
>
> Of course, judging by the diffstat is wrong.
>

I'm more than happy to be wrong and you for sure can help me.
Can you provide any quantitative support of your claims?

Thanks

>
>
> --
> Best Regards
> Masahiro Yamada
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-09  6:05         ` Leon Romanovsky
  0 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-09  6:05 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Jani Nikula,
	J. Bruce Fields, David Howells, intel-gfx, Yishai Hadas, Joonas

[-- Attachment #1: Type: text/plain, Size: 1031 bytes --]

On Mon, Oct 09, 2017 at 02:58:58PM +0900, Masahiro Yamada wrote:
> 2017-10-09 3:52 GMT+09:00 Leon Romanovsky <leonro@mellanox.com>:
> > On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
> >
> > <...>
> >>
> >> By splitting out the radix_tree_root definition,
> >> we can reduce the header file dependency.
> >>
> >> Reducing the header dependency will help for speeding the kernel
> >> build, suppressing unnecessary recompile of objects during
> >> git-bisect'ing, etc.
> >
> > If we judge by the diffstat of this series, there won't be any
> > visible change in anything mentioned above.
>
>
> Of course, judging by the diffstat is wrong.
>

I'm more than happy to be wrong and you for sure can help me.
Can you provide any quantitative support of your claims?

Thanks

>
>
> --
> Best Regards
> Masahiro Yamada
> --
> To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-09  5:56         ` Masahiro Yamada
@ 2017-10-09  6:10               ` Leon Romanovsky
  0 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-09  6:10 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: David Miller, Linux Kernel Mailing List, Thomas Gleixner,
	Andrew Morton, Ian Abbott, Ingo Molnar, Linus Torvalds,
	linux-rdma-u79uwXL29TY76Z2rM5mHXA,
	yishaih-VPRAkNaXOzVWk0Htik3J/w, tariqt-VPRAkNaXOzVWk0Htik3J/w,
	netdev-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 1763 bytes --]

On Mon, Oct 09, 2017 at 02:56:56PM +0900, Masahiro Yamada wrote:
> 2017-10-09 3:55 GMT+09:00 Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>:
> > On Mon, Oct 09, 2017 at 02:29:15AM +0900, Masahiro Yamada wrote:
> >> 2017-10-09 2:00 GMT+09:00 David Miller <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>:
> >> > From: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> >> > Date: Mon,  9 Oct 2017 01:10:11 +0900
> >> >
> >> >> The headers
> >> >>  - include/linux/mlx4/device.h
> >> >>  - drivers/net/ethernet/mellanox/mlx4/mlx4.h
> >> >> require the definition of struct radix_tree_root, but do not need to
> >> >> know anything about other radix tree stuff.
> >> >>
> >> >> Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
> >> >> reduce the header dependency.
> >> >>
> >> >> While we are here, let's add missing <linux/radix-tree.h> where
> >> >> radix tree accessors are used.
> >> >>
> >> >> Signed-off-by: Masahiro Yamada <yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
> >> >
> >> > Honestly this makes things more complicated.
> >>
> >>
> >> The idea is simple; include necessary headers explicitly.
> >>
> >> Putting everything into one common header
> >> means most of C files are forced to parse unnecessary headers.
> >
> > It is neglected, only first caller will actually parse that header file,
> > other callers will check the #ifndef pragma without need to reparse the
> > whole file.
> >
>
>
> You completely neglected the point of the discussion.
>
> I am trying to not include unnecessary headers at all.
>

I understand it and have no issues with that, just have hard time to justify for
myself any benefit of doing it.

Thanks

>
>
>
> --
> Best Regards
> Masahiro Yamada

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
@ 2017-10-09  6:10               ` Leon Romanovsky
  0 siblings, 0 replies; 50+ messages in thread
From: Leon Romanovsky @ 2017-10-09  6:10 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: David Miller, Linux Kernel Mailing List, Thomas Gleixner,
	Andrew Morton, Ian Abbott, Ingo Molnar, Linus Torvalds,
	linux-rdma, yishaih, tariqt, netdev

[-- Attachment #1: Type: text/plain, Size: 1656 bytes --]

On Mon, Oct 09, 2017 at 02:56:56PM +0900, Masahiro Yamada wrote:
> 2017-10-09 3:55 GMT+09:00 Leon Romanovsky <leon@kernel.org>:
> > On Mon, Oct 09, 2017 at 02:29:15AM +0900, Masahiro Yamada wrote:
> >> 2017-10-09 2:00 GMT+09:00 David Miller <davem@davemloft.net>:
> >> > From: Masahiro Yamada <yamada.masahiro@socionext.com>
> >> > Date: Mon,  9 Oct 2017 01:10:11 +0900
> >> >
> >> >> The headers
> >> >>  - include/linux/mlx4/device.h
> >> >>  - drivers/net/ethernet/mellanox/mlx4/mlx4.h
> >> >> require the definition of struct radix_tree_root, but do not need to
> >> >> know anything about other radix tree stuff.
> >> >>
> >> >> Include <linux/radix-tree-root.h> instead of <linux/radix-tree.h> to
> >> >> reduce the header dependency.
> >> >>
> >> >> While we are here, let's add missing <linux/radix-tree.h> where
> >> >> radix tree accessors are used.
> >> >>
> >> >> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> >> >
> >> > Honestly this makes things more complicated.
> >>
> >>
> >> The idea is simple; include necessary headers explicitly.
> >>
> >> Putting everything into one common header
> >> means most of C files are forced to parse unnecessary headers.
> >
> > It is neglected, only first caller will actually parse that header file,
> > other callers will check the #ifndef pragma without need to reparse the
> > whole file.
> >
>
>
> You completely neglected the point of the discussion.
>
> I am trying to not include unnecessary headers at all.
>

I understand it and have no issues with that, just have hard time to justify for
myself any benefit of doing it.

Thanks

>
>
>
> --
> Best Regards
> Masahiro Yamada

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: [PATCH 10/12] net/mlx4: replace <linux/radix-tree.h> with <linux/radix-tree-root.h>
  2017-10-08 17:32       ` Joe Perches
       [not found]         ` <1507483942.11434.4.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
@ 2017-10-09 12:02         ` Masahiro Yamada
  1 sibling, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-09 12:02 UTC (permalink / raw)
  To: Joe Perches
  Cc: David Miller, Linux Kernel Mailing List, Thomas Gleixner,
	Andrew Morton, Ian Abbott, Ingo Molnar, Linus Torvalds,
	linux-rdma, Yishai Hadas, Tariq Toukan, netdev

2017-10-09 2:32 GMT+09:00 Joe Perches <joe@perches.com>:
> On Mon, 2017-10-09 at 02:29 +0900, Masahiro Yamada wrote:
>> The idea is simple; include necessary headers explicitly.
>
> Try that for kernel.h
>
> There's a reason aggregation of #includes is useful.
>

BTW, talking about <linux/kernel.h>, it is too much aggregation, isn't it?

It exceed 850 lines, and contains lots of unrelated stuff in one header.
Perhaps, it could be a good time to think about splitting?

For example, I see many trace_... things in it.

I wonder if linux/kernel.h is a good home for them, or a separate file.


-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
  2017-10-08 16:10 ` Masahiro Yamada
  (?)
  (?)
@ 2017-10-10 12:18   ` Matthew Wilcox
  -1 siblings, 0 replies; 50+ messages in thread
From: Matthew Wilcox @ 2017-10-10 12:18 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kernel, Thomas Gleixner, Andrew Morton, Ian Abbott,
	Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas, Joonas

On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
> Reducing the header dependency will help for speeding the kernel
> build, suppressing unnecessary recompile of objects during
> git-bisect'ing, etc.

Well, does it?  You could provide measurements showing before/after
time to compile, or time to recompile after touching a header file that
is included by radix-tree.h and not by radix-tree-root.h.

Look at the files included (never mind the transitively included files):

#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/preempt.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
#include <linux/types.h>

These are not exactly rare files to be included.  My guess is that most
of the files in the kernel end up depending on these files *anyway*, either
directly or through some path that isn't the radix tree.

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-10 12:18   ` Matthew Wilcox
  0 siblings, 0 replies; 50+ messages in thread
From: Matthew Wilcox @ 2017-10-10 12:18 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kernel, Thomas Gleixner, Andrew Morton, Ian Abbott,
	Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas, Joonas

On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
> Reducing the header dependency will help for speeding the kernel
> build, suppressing unnecessary recompile of objects during
> git-bisect'ing, etc.

Well, does it?  You could provide measurements showing before/after
time to compile, or time to recompile after touching a header file that
is included by radix-tree.h and not by radix-tree-root.h.

Look at the files included (never mind the transitively included files):

#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/preempt.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
#include <linux/types.h>

These are not exactly rare files to be included.  My guess is that most
of the files in the kernel end up depending on these files *anyway*, either
directly or through some path that isn't the radix tree.

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-10 12:18   ` Matthew Wilcox
  0 siblings, 0 replies; 50+ messages in thread
From: Matthew Wilcox @ 2017-10-10 12:18 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kernel, Thomas Gleixner, Andrew Morton, Ian Abbott,
	Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas, Joonas Lahtinen, Matan Barak, netdev,
	Saeed Mahameed, Jeff Layton, linux-fsdevel, Marc Zyngier

On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
> Reducing the header dependency will help for speeding the kernel
> build, suppressing unnecessary recompile of objects during
> git-bisect'ing, etc.

Well, does it?  You could provide measurements showing before/after
time to compile, or time to recompile after touching a header file that
is included by radix-tree.h and not by radix-tree-root.h.

Look at the files included (never mind the transitively included files):

#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/preempt.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
#include <linux/types.h>

These are not exactly rare files to be included.  My guess is that most
of the files in the kernel end up depending on these files *anyway*, either
directly or through some path that isn't the radix tree.

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-10 12:18   ` Matthew Wilcox
  0 siblings, 0 replies; 50+ messages in thread
From: Matthew Wilcox @ 2017-10-10 12:18 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: linux-kernel, Thomas Gleixner, Andrew Morton, Ian Abbott,
	Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas, Joonas

On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
> Reducing the header dependency will help for speeding the kernel
> build, suppressing unnecessary recompile of objects during
> git-bisect'ing, etc.

Well, does it?  You could provide measurements showing before/after
time to compile, or time to recompile after touching a header file that
is included by radix-tree.h and not by radix-tree-root.h.

Look at the files included (never mind the transitively included files):

#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/preempt.h>
#include <linux/rcupdate.h>
#include <linux/spinlock.h>
#include <linux/types.h>

These are not exactly rare files to be included.  My guess is that most
of the files in the kernel end up depending on these files *anyway*, either
directly or through some path that isn't the radix tree.

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
  2017-10-10 12:18   ` Matthew Wilcox
  (?)
@ 2017-10-10 12:56     ` Masahiro Yamada
  -1 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-10 12:56 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx, Yishai

2017-10-10 21:18 GMT+09:00 Matthew Wilcox <willy@infradead.org>:
> On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
>> Reducing the header dependency will help for speeding the kernel
>> build, suppressing unnecessary recompile of objects during
>> git-bisect'ing, etc.
>
> Well, does it?  You could provide measurements showing before/after
> time to compile, or time to recompile after touching a header file that
> is included by radix-tree.h and not by radix-tree-root.h.
>
> Look at the files included (never mind the transitively included files):
>
> #include <linux/bitops.h>
> #include <linux/bug.h>
> #include <linux/kernel.h>
> #include <linux/list.h>
> #include <linux/preempt.h>
> #include <linux/rcupdate.h>
> #include <linux/spinlock.h>
> #include <linux/types.h>
>
> These are not exactly rare files to be included.  My guess is that most
> of the files in the kernel end up depending on these files *anyway*, either
> directly or through some path that isn't the radix tree.


Good question.

I tested this series, and I confirmed
the total number of included headers decreased,
but did not decrease as much as I had expected.

The statement "most of the files in the kernel end
up depending on these files" is true.

But, with that excuse,
I do not want to conclude this kind of refactoring is pointless.


For example, how can we explain
commit bc6245e5efd70c41eaf9334b1b5e646745cb0fb3 ?


<linux/bug.h> includes the following three.

#include <asm/bug.h>
#include <linux/compiler.h>
#include <linux/build_bug.h>

Your statement applies to them too.
Actually, I did not see any impact
by replacing <linux/bug.h> in my files with <linux/build_bug.h>



Generally, people do not pay much attention
in decreasing header dependency.

One refactoring alone does not produce much benefits,
but making continuous efforts will disentangle the knotted threads.
Of course, this might be a pipe dream...



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-10 12:56     ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-10 12:56 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx, Yishai

2017-10-10 21:18 GMT+09:00 Matthew Wilcox <willy@infradead.org>:
> On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
>> Reducing the header dependency will help for speeding the kernel
>> build, suppressing unnecessary recompile of objects during
>> git-bisect'ing, etc.
>
> Well, does it?  You could provide measurements showing before/after
> time to compile, or time to recompile after touching a header file that
> is included by radix-tree.h and not by radix-tree-root.h.
>
> Look at the files included (never mind the transitively included files):
>
> #include <linux/bitops.h>
> #include <linux/bug.h>
> #include <linux/kernel.h>
> #include <linux/list.h>
> #include <linux/preempt.h>
> #include <linux/rcupdate.h>
> #include <linux/spinlock.h>
> #include <linux/types.h>
>
> These are not exactly rare files to be included.  My guess is that most
> of the files in the kernel end up depending on these files *anyway*, either
> directly or through some path that isn't the radix tree.


Good question.

I tested this series, and I confirmed
the total number of included headers decreased,
but did not decrease as much as I had expected.

The statement "most of the files in the kernel end
up depending on these files" is true.

But, with that excuse,
I do not want to conclude this kind of refactoring is pointless.


For example, how can we explain
commit bc6245e5efd70c41eaf9334b1b5e646745cb0fb3 ?


<linux/bug.h> includes the following three.

#include <asm/bug.h>
#include <linux/compiler.h>
#include <linux/build_bug.h>

Your statement applies to them too.
Actually, I did not see any impact
by replacing <linux/bug.h> in my files with <linux/build_bug.h>



Generally, people do not pay much attention
in decreasing header dependency.

One refactoring alone does not produce much benefits,
but making continuous efforts will disentangle the knotted threads.
Of course, this might be a pipe dream...



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-10 12:56     ` Masahiro Yamada
  0 siblings, 0 replies; 50+ messages in thread
From: Masahiro Yamada @ 2017-10-10 12:56 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas, Joonas Lahtinen, Matan Barak, netdev,
	Saeed Mahameed, Jeff Layton, linux-fsdevel, Marc Zyngier

2017-10-10 21:18 GMT+09:00 Matthew Wilcox <willy@infradead.org>:
> On Mon, Oct 09, 2017 at 01:10:01AM +0900, Masahiro Yamada wrote:
>> Reducing the header dependency will help for speeding the kernel
>> build, suppressing unnecessary recompile of objects during
>> git-bisect'ing, etc.
>
> Well, does it?  You could provide measurements showing before/after
> time to compile, or time to recompile after touching a header file that
> is included by radix-tree.h and not by radix-tree-root.h.
>
> Look at the files included (never mind the transitively included files):
>
> #include <linux/bitops.h>
> #include <linux/bug.h>
> #include <linux/kernel.h>
> #include <linux/list.h>
> #include <linux/preempt.h>
> #include <linux/rcupdate.h>
> #include <linux/spinlock.h>
> #include <linux/types.h>
>
> These are not exactly rare files to be included.  My guess is that most
> of the files in the kernel end up depending on these files *anyway*, either
> directly or through some path that isn't the radix tree.


Good question.

I tested this series, and I confirmed
the total number of included headers decreased,
but did not decrease as much as I had expected.

The statement "most of the files in the kernel end
up depending on these files" is true.

But, with that excuse,
I do not want to conclude this kind of refactoring is pointless.


For example, how can we explain
commit bc6245e5efd70c41eaf9334b1b5e646745cb0fb3 ?


<linux/bug.h> includes the following three.

#include <asm/bug.h>
#include <linux/compiler.h>
#include <linux/build_bug.h>

Your statement applies to them too.
Actually, I did not see any impact
by replacing <linux/bug.h> in my files with <linux/build_bug.h>



Generally, people do not pay much attention
in decreasing header dependency.

One refactoring alone does not produce much benefits,
but making continuous efforts will disentangle the knotted threads.
Of course, this might be a pipe dream...



-- 
Best Regards
Masahiro Yamada

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
  2017-10-10 12:56     ` Masahiro Yamada
  (?)
@ 2017-10-10 13:20       ` Matthew Wilcox
  -1 siblings, 0 replies; 50+ messages in thread
From: Matthew Wilcox @ 2017-10-10 13:20 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx, Yishai

On Tue, Oct 10, 2017 at 09:56:22PM +0900, Masahiro Yamada wrote:
> One refactoring alone does not produce much benefits,
> but making continuous efforts will disentangle the knotted threads.
> Of course, this might be a pipe dream...

A lot of people have had that dream, and some of those refactoring
efforts have proven worthwhile.  But it's not a dream without costs;
your refactoring will conflict with other changes.  I don't think the
benefit here is high enough to pursue this edition of the dream.

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-10 13:20       ` Matthew Wilcox
  0 siblings, 0 replies; 50+ messages in thread
From: Matthew Wilcox @ 2017-10-10 13:20 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx, Yishai

On Tue, Oct 10, 2017 at 09:56:22PM +0900, Masahiro Yamada wrote:
> One refactoring alone does not produce much benefits,
> but making continuous efforts will disentangle the knotted threads.
> Of course, this might be a pipe dream...

A lot of people have had that dream, and some of those refactoring
efforts have proven worthwhile.  But it's not a dream without costs;
your refactoring will conflict with other changes.  I don't think the
benefit here is high enough to pursue this edition of the dream.

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

* Re: [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h>
@ 2017-10-10 13:20       ` Matthew Wilcox
  0 siblings, 0 replies; 50+ messages in thread
From: Matthew Wilcox @ 2017-10-10 13:20 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Linux Kernel Mailing List, Thomas Gleixner, Andrew Morton,
	Ian Abbott, Ingo Molnar, Linus Torvalds, linux-cachefs, linux-sh,
	Rodrigo Vivi, dri-devel, David Airlie, linux-rdma,
	Yoshinori Sato, Tariq Toukan, Rich Felker, Leon Romanovsky,
	Jani Nikula, J. Bruce Fields, David Howells, intel-gfx,
	Yishai Hadas, Joonas Lahtinen, Matan Barak, netdev,
	Saeed Mahameed, Jeff Layton, linux-fsdevel, Marc Zyngier

On Tue, Oct 10, 2017 at 09:56:22PM +0900, Masahiro Yamada wrote:
> One refactoring alone does not produce much benefits,
> but making continuous efforts will disentangle the knotted threads.
> Of course, this might be a pipe dream...

A lot of people have had that dream, and some of those refactoring
efforts have proven worthwhile.  But it's not a dream without costs;
your refactoring will conflict with other changes.  I don't think the
benefit here is high enough to pursue this edition of the dream.

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

end of thread, other threads:[~2017-10-10 13:20 UTC | newest]

Thread overview: 50+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-08 16:10 [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h> Masahiro Yamada
2017-10-08 16:10 ` Masahiro Yamada
2017-10-08 16:10 ` Masahiro Yamada
2017-10-08 16:10 ` Masahiro Yamada
2017-10-08 16:10 ` [PATCH 01/12] radix-tree: replace <linux/spinlock.h> with <linux/spinlock_types.h> Masahiro Yamada
2017-10-08 16:10 ` [PATCH 02/12] radix-tree: split struct radix_tree_root to <linux/radix-tree-root.h> Masahiro Yamada
2017-10-08 16:10 ` [PATCH 03/12] irqdomain: replace <linux/radix-tree.h> with <linux/radix-tree-root.h> Masahiro Yamada
2017-10-08 16:10 ` [PATCH 04/12] writeback: " Masahiro Yamada
2017-10-08 16:10 ` [PATCH 05/12] iocontext.h: " Masahiro Yamada
2017-10-08 16:10 ` [PATCH 06/12] fs: " Masahiro Yamada
2017-10-08 16:10 ` [PATCH 07/12] blkcg: " Masahiro Yamada
2017-10-08 16:10 ` [PATCH 08/12] fscache: include <linux-radix-tree.h> Masahiro Yamada
2017-10-08 16:10 ` [PATCH 09/12] sh: intc: replace <linux/radix-tree.h> with <linux/radix-tree-root.h> Masahiro Yamada
2017-10-08 16:10   ` Masahiro Yamada
2017-10-08 16:10 ` [PATCH 10/12] net/mlx4: " Masahiro Yamada
2017-10-08 17:00   ` David Miller
2017-10-08 17:29     ` Masahiro Yamada
2017-10-08 17:32       ` Joe Perches
     [not found]         ` <1507483942.11434.4.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2017-10-09  5:55           ` Masahiro Yamada
2017-10-09  5:55             ` Masahiro Yamada
2017-10-09 12:02         ` Masahiro Yamada
2017-10-08 18:55       ` Leon Romanovsky
2017-10-09  5:56         ` Masahiro Yamada
     [not found]           ` <CAK7LNARAhAaO+YjqXyBbi=-udCu8zzGnLMsoVNdkSXtXPuMKsA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-10-09  6:10             ` Leon Romanovsky
2017-10-09  6:10               ` Leon Romanovsky
2017-10-08 16:10 ` [PATCH 11/12] net/mlx5: " Masahiro Yamada
2017-10-08 17:00   ` David Miller
2017-10-08 16:10 ` [PATCH 12/12] drm/i915: " Masahiro Yamada
     [not found] ` <1507479013-5207-1-git-send-email-yamada.masahiro-uWyLwvC0a2jby3iVrkZq2A@public.gmane.org>
2017-10-08 18:52   ` [PATCH 00/12] radix-tree: split out struct radix_tree_root out to <linux/radix-tree-root.h> Leon Romanovsky
2017-10-08 18:52     ` Leon Romanovsky
2017-10-08 18:52     ` Leon Romanovsky
2017-10-08 18:52     ` Leon Romanovsky
2017-10-09  5:58     ` Masahiro Yamada
2017-10-09  5:58       ` Masahiro Yamada
2017-10-09  5:58       ` Masahiro Yamada
2017-10-09  5:58       ` Masahiro Yamada
2017-10-09  6:05       ` Leon Romanovsky
2017-10-09  6:05         ` Leon Romanovsky
2017-10-09  6:05         ` Leon Romanovsky
2017-10-09  6:05         ` Leon Romanovsky
2017-10-10 12:18 ` Matthew Wilcox
2017-10-10 12:18   ` Matthew Wilcox
2017-10-10 12:18   ` Matthew Wilcox
2017-10-10 12:18   ` Matthew Wilcox
2017-10-10 12:56   ` Masahiro Yamada
2017-10-10 12:56     ` Masahiro Yamada
2017-10-10 12:56     ` Masahiro Yamada
2017-10-10 13:20     ` Matthew Wilcox
2017-10-10 13:20       ` Matthew Wilcox
2017-10-10 13:20       ` Matthew Wilcox

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.