linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Brendan Jackman <jackmanb@google.com>
To: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
Cc: "Liam R. Howlett" <Liam.Howlett@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	 Vlastimil Babka <vbabka@suse.cz>, Jann Horn <jannh@google.com>,
	Pedro Falcato <pfalcato@suse.de>,  <linux-kernel@vger.kernel.org>,
	<maple-tree@lists.infradead.org>,  <linux-mm@kvack.org>
Subject: Re: [PATCH 0/3] tools: testing: Use existing atomic.h for vma/radix-tree tests
Date: Thu, 28 Aug 2025 12:09:40 +0000	[thread overview]
Message-ID: <DCE1SYEUTLM5.3L54LZGH0QVAL@google.com> (raw)
In-Reply-To: <9cefb766-d6ca-4c82-84ae-8a47b1fc6e84@lucifer.local>

On Thu Aug 28, 2025 at 10:28 AM UTC, Lorenzo Stoakes wrote:
> On Wed, Aug 27, 2025 at 11:04:40AM +0000, Brendan Jackman wrote:
>> De-duplicating this lets us delete a bit of code.
>
> Thanks very much! This is nice stuff.
>
>>
>> Ulterior motive: I'm working on a new set of the userspace-based unit
>> tests, which will need the atomics API too. That would involve even more
>> duplication, so while the win in this patchset alone is very minimal, it
>> looks a lot more significant with my other WIP patchset.
>
> I hope that my + Liam's work helped inspire you :)

Certainly! Unfortunately after spending most of the last week on it I
decided I need to cut my losses for the time being. I can see where it
needs to get to but it's hard to say how many more days I'll have to
pour into fiddling around splitting headers and moving definitions etc
etc etc. This unknown number of days is hard to justify investing right
now, given that I think there's a high risk people see the amount of
code movement and go "please immediately step away from my codebase":

❯❯  git diff --stat origin/master..buddy-tests
 include/linux/buddy.h                    |   58 ++
 include/linux/gfp.h                      |   36 +-
 include/linux/mm.h                       |   13 -
 include/linux/mm_types.h                 |  103 ++-
 include/linux/mmzone.h                   |  942 +-------------------
 include/linux/mmzone_types.h             | 1080 ++++++++++++++++++++++
 include/linux/nodemask_types.h           |    2 +-
 include/linux/page-flags.h               |   52 +-
 include/linux/page-isolation.h           |    8 -
 include/trace/events/kmem.h              |    1 +
 kernel/bounds.c                          |    9 +-
 mm/Makefile                              |    2 +-
 mm/buddy.c                               | 3618 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 mm/buddy.h                               |  738 +++++++++++++++
 mm/buddy_internal.h                      |  136 +++
 mm/compaction.c                          |    1 +
 mm/internal.h                            |  300 +++----
 mm/page_alloc.c                          | 4403 +++---------------------------------------------------------------------------------------
 mm/page_isolation.c                      |    1 +
 mm/page_reporting.c                      |    1 +
 mm/show_mem.c                            |    1 +
 mm/vmstat.c                              |    1 +
 tools/include/linux/atomic.h             |   19 +
 tools/include/linux/bitops.h             |    9 +
 tools/include/linux/cache.h              |    2 +
 tools/include/linux/llist.h              |  317 +++++++
 tools/include/linux/math.h               |   12 +
 tools/include/linux/spinlock.h           |    1 +
 tools/testing/buddy/.gitignore           |    7 +
 tools/testing/buddy/Makefile             |   18 +
 tools/testing/buddy/buddy.c              |   40 +
 tools/testing/buddy/buddy_internal.h     |  256 ++++++
 tools/testing/buddy/linux/mm_types.h     |   54 ++
 tools/testing/buddy/linux/mmdebug.h      |   13 +
 tools/testing/buddy/linux/nr_pageflags.h |   12 +
 tools/testing/buddy/linux/seqlock.h      |    5 +
 tools/testing/shared/linux/lockdep.h     |    3 +
 tools/testing/shared/linux/maple_tree.h  |    6 +-
 tools/testing/shared/shared.mk           |    6 +-
 tools/testing/vma/linux/atomic.h         |   17 -
 tools/testing/vma/vma_internal.h         |    3 +-
 41 files changed, 6776 insertions(+), 5530 deletions(-)

Anyway, at least it resulted in a nice little cleanup for the existing
tests. And maybe I'll get back to it soon when I'm back to being
frustrated about how hard it is to be sure my page_alloc.c code works.


      reply	other threads:[~2025-08-28 12:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-27 11:04 [PATCH 0/3] tools: testing: Use existing atomic.h for vma/radix-tree tests Brendan Jackman
2025-08-27 11:04 ` [PATCH 1/3] tools: testing: Allow importing arch headers in shared.mk Brendan Jackman
2025-08-27 12:50   ` Pedro Falcato
2025-08-27 15:07     ` Brendan Jackman
2025-08-27 18:43       ` Liam R. Howlett
2025-08-28  1:00   ` Liam R. Howlett
2025-08-28 10:23   ` Lorenzo Stoakes
2025-08-28 11:59     ` Brendan Jackman
2025-08-27 11:04 ` [PATCH 2/3] tools: testing: Use existing atomic.h for vma/radix-tree tests Brendan Jackman
2025-08-27 12:56   ` Pedro Falcato
2025-08-27 15:19     ` Brendan Jackman
2025-08-28  1:05   ` Liam R. Howlett
2025-08-28  9:20     ` Brendan Jackman
2025-08-28 10:26   ` Lorenzo Stoakes
2025-08-27 11:04 ` [PATCH 3/3] tools: testing: Support EXTRA_CFLAGS in shared.mk Brendan Jackman
2025-08-27 12:57   ` Pedro Falcato
2025-08-28  1:04   ` Liam R. Howlett
2025-08-28 10:27   ` Lorenzo Stoakes
2025-08-28 10:28 ` [PATCH 0/3] tools: testing: Use existing atomic.h for vma/radix-tree tests Lorenzo Stoakes
2025-08-28 12:09   ` Brendan Jackman [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DCE1SYEUTLM5.3L54LZGH0QVAL@google.com \
    --to=jackmanb@google.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=akpm@linux-foundation.org \
    --cc=jannh@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=maple-tree@lists.infradead.org \
    --cc=pfalcato@suse.de \
    --cc=vbabka@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).