All of lore.kernel.org
 help / color / mirror / Atom feed
* [GIT PULL] XArray for 5.8
@ 2020-07-22 14:11 Matthew Wilcox
  2020-07-22 18:40 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2020-07-22 14:11 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

The following changes since commit 4fa640dc52302b5e62b01b05c755b055549633ae:

  Merge tag 'vfio-v5.8-rc7' of git://github.com/awilliam/linux-vfio into master (2020-07-20 13:30:59 -0700)

are available in the Git repository at:

  git://git.infradead.org/users/willy/xarray.git tags/xarray-5.8

for you to fetch changes up to f177a7956685320eef43d248d39f61a74290f031:

  XArray: Test multiorder marked iteration (2020-07-22 09:58:48 -0400)

----------------------------------------------------------------
XArray updates for 5.8

 - Fix the test suite after introduction of the local_lock
 - Fix a bug in the IDA spotted by Coverity
 - Add a few more tests to the test suite

----------------------------------------------------------------
Matthew Wilcox (Oracle) (4):
      radix tree test suite: Fix compilation
      ida: Free allocated bitmap in error path
      XArray: Test two more things about xa_cmpxchg
      XArray: Test multiorder marked iteration

 include/linux/radix-tree.h                  |  3 ++-
 lib/idr.c                                   |  1 +
 lib/radix-tree.c                            |  1 -
 lib/test_xarray.c                           | 25 +++++++++++++++++++++++++
 tools/testing/radix-tree/idr-test.c         | 29 +++++++++++++++++++++++++++++
 tools/testing/radix-tree/linux/kernel.h     |  1 +
 tools/testing/radix-tree/linux/local_lock.h |  8 ++++++++
 tools/testing/radix-tree/test.h             |  4 ----
 8 files changed, 66 insertions(+), 6 deletions(-)
 create mode 100644 tools/testing/radix-tree/linux/local_lock.h


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

* Re: [GIT PULL] XArray for 5.8
  2020-07-22 14:11 [GIT PULL] XArray for 5.8 Matthew Wilcox
@ 2020-07-22 18:40 ` Linus Torvalds
  2020-07-22 18:46   ` Matthew Wilcox
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2020-07-22 18:40 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Linux Kernel Mailing List

On Wed, Jul 22, 2020 at 7:11 AM Matthew Wilcox <willy@infradead.org> wrote:
>
> XArray updates for 5.8
>
>  - Fix the test suite after introduction of the local_lock

What? No.

Now you broke the actual kernel build:

  In file included from ./include/linux/local_lock.h:5,
                   from ./include/linux/radix-tree.h:14,
                   from ./include/linux/idr.h:15,
                   from lib/idr.c:5:
  ./include/linux/local_lock_internal.h: In function ‘local_lock_acquire’:
  ./include/linux/local_lock_internal.h:41:13: error: ‘current’
undeclared (first use in this function)
     41 |  l->owner = current;
        |             ^~~~~~~
  ./include/linux/local_lock_internal.h:41:13: note: each undeclared
identifier is reported only once for each function it appears in

How the hell did you not see this, and why did you think it was a good
idea to mess with kernel headers and make them alphabetically ordered?

Headers need to be ordered by _contents_, not by some "sort alphabetically".

Do you sort your bookcases by color and size of the book too?

                  Linus

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

* Re: [GIT PULL] XArray for 5.8
  2020-07-22 18:40 ` Linus Torvalds
@ 2020-07-22 18:46   ` Matthew Wilcox
  2020-07-22 19:01     ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: Matthew Wilcox @ 2020-07-22 18:46 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: Linux Kernel Mailing List

On Wed, Jul 22, 2020 at 11:40:13AM -0700, Linus Torvalds wrote:
> On Wed, Jul 22, 2020 at 7:11 AM Matthew Wilcox <willy@infradead.org> wrote:
> >
> > XArray updates for 5.8
> >
> >  - Fix the test suite after introduction of the local_lock
> 
> What? No.
> 
> Now you broke the actual kernel build:
> 
>   In file included from ./include/linux/local_lock.h:5,
>                    from ./include/linux/radix-tree.h:14,
>                    from ./include/linux/idr.h:15,
>                    from lib/idr.c:5:
>   ./include/linux/local_lock_internal.h: In function ‘local_lock_acquire’:
>   ./include/linux/local_lock_internal.h:41:13: error: ‘current’
> undeclared (first use in this function)
>      41 |  l->owner = current;
>         |             ^~~~~~~
>   ./include/linux/local_lock_internal.h:41:13: note: each undeclared
> identifier is reported only once for each function it appears in
> 
> How the hell did you not see this, and why did you think it was a good
> idea to mess with kernel headers and make them alphabetically ordered?

Ah, crap.  I was building without CONFIG_DEBUG_LOCK_ALLOC, so I didn't
see this.

But I think the real problem is that local_lock_internal.h doesn't include
<linux/sched.h>.  Header files shouldn't depend on other headers to be
included first.

> Headers need to be ordered by _contents_, not by some "sort alphabetically".
> 
> Do you sort your bookcases by color and size of the book too?

By author, typically ;-)

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

* Re: [GIT PULL] XArray for 5.8
  2020-07-22 18:46   ` Matthew Wilcox
@ 2020-07-22 19:01     ` Linus Torvalds
  0 siblings, 0 replies; 4+ messages in thread
From: Linus Torvalds @ 2020-07-22 19:01 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: Linux Kernel Mailing List

On Wed, Jul 22, 2020 at 11:46 AM Matthew Wilcox <willy@infradead.org> wrote:
>
> But I think the real problem is that local_lock_internal.h doesn't include
> <linux/sched.h>.  Header files shouldn't depend on other headers to be
> included first.

The big hint is that name: "internal".

Also, we often violate the "shouldn't depend on other headers" rule.
Some basic headers are just that - basic. And some headers are not.

Things like the uapi headers need to be independent, but we've had
circular ordering problems with kernel headers, and sometimes it's
just better to say "you need to just get the basic header first".

            Linus

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

end of thread, other threads:[~2020-07-22 19:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-22 14:11 [GIT PULL] XArray for 5.8 Matthew Wilcox
2020-07-22 18:40 ` Linus Torvalds
2020-07-22 18:46   ` Matthew Wilcox
2020-07-22 19:01     ` Linus Torvalds

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.