All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5 0/7] mm: Use slab_list list_head instead of lru
@ 2019-04-02 23:05 Tobin C. Harding
  2019-04-02 23:05 ` [PATCH v5 1/7] list: Add function list_rotate_to_front() Tobin C. Harding
                   ` (7 more replies)
  0 siblings, 8 replies; 30+ messages in thread
From: Tobin C. Harding @ 2019-04-02 23:05 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Tobin C. Harding, Roman Gushchin, Christoph Lameter,
	Pekka Enberg, David Rientjes, Joonsoo Kim, Matthew Wilcox,
	linux-mm, linux-kernel

Hi Andrew,

Here is the updated series that caused the bug found by 0day test
robot.  To ease the load on your memory, this series is aimed at
replacing the following:

Original buggy series:

 mm-remove-stale-comment-from-page-struct.patch
 slub-use-slab_list-instead-of-lru.patch
 slab-use-slab_list-instead-of-lru.patch
 slob-use-slab_list-instead-of-lru.patch
 slub-add-comments-to-endif-pre-processor-macros.patch
 slob-respect-list_head-abstraction-layer.patch
 list-add-function-list_rotate_to_front.patch

And the bug fix patch:

 slob-only-use-list-functions-when-safe-to-do-so.patch

Applies cleanly on top of Linus' tree (tag: v5.1-rc3).

This series differs from the bug fix above by adding a separate return
parameter to slob_page_alloc() instead of using a double pointer.  This
is defensive in case later someone adds code that accesses sp (struct
page *), also it is easier to read/verify the code since its less 'tricky'.

Tested by building and booting a kernel using the SLOB allocator and
with CONFIG_DEBUG_LIST.

From v4 ... 

Currently the slab allocators (ab)use the struct page 'lru' list_head.
We have a list head for slab allocators to use, 'slab_list'.

During v2 it was noted by Christoph that the SLOB allocator was reaching
into a list_head, this version adds 2 patches to the front of the set to
fix that.

Clean up all three allocators by using the 'slab_list' list_head instead
of overloading the 'lru' list_head.

Changes since v4:
 - Add return parameter to slob_page_alloc() to indicate whether the
   page is removed from the freelist during allocation.
 - Only do list rotate optimisation if the page was _not_ removed from
   the freelist (fix bug found by 0day test robot).

Changes since v3:

 - Change all ->lru to ->slab_list in slob (thanks Roman).

Changes since v2:

 - Add list_rotate_to_front().
 - Fix slob to use list_head API.
 - Re-order patches to put the list.h changes up front.
 - Add acks from Christoph.

Changes since v1:

 - Verify object files are the same before and after the patch set is
   applied (suggested by Matthew).
 - Add extra explanation to the commit logs explaining why these changes
   are safe to make (suggested by Roman).
 - Remove stale comment (thanks Willy).


thanks,
Tobin.


Tobin C. Harding (7):
  list: Add function list_rotate_to_front()
  slob: Respect list_head abstraction layer
  slob: Use slab_list instead of lru
  slub: Add comments to endif pre-processor macros
  slub: Use slab_list instead of lru
  slab: Use slab_list instead of lru
  mm: Remove stale comment from page struct

 include/linux/list.h     | 18 ++++++++++++
 include/linux/mm_types.h |  2 +-
 mm/slab.c                | 49 ++++++++++++++++----------------
 mm/slob.c                | 59 +++++++++++++++++++++++++++------------
 mm/slub.c                | 60 ++++++++++++++++++++--------------------
 5 files changed, 115 insertions(+), 73 deletions(-)

-- 
2.21.0


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

end of thread, other threads:[~2019-04-09 22:25 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-02 23:05 [PATCH v5 0/7] mm: Use slab_list list_head instead of lru Tobin C. Harding
2019-04-02 23:05 ` [PATCH v5 1/7] list: Add function list_rotate_to_front() Tobin C. Harding
2019-04-03 15:46   ` Christopher Lameter
2019-04-03 15:46     ` Christopher Lameter
2019-04-03 17:57   ` Roman Gushchin
2019-04-02 23:05 ` [PATCH v5 2/7] slob: Respect list_head abstraction layer Tobin C. Harding
2019-04-03 15:45   ` Christopher Lameter
2019-04-03 15:45     ` Christopher Lameter
2019-04-03 18:00   ` Roman Gushchin
2019-04-03 21:03     ` Tobin C. Harding
2019-04-03 21:23       ` Roman Gushchin
2019-04-03 22:14         ` Tobin C. Harding
2019-04-03 21:13     ` Tobin C. Harding
2019-04-09 12:59       ` Vlastimil Babka
2019-04-09 20:06         ` Tobin C. Harding
2019-04-09 22:25           ` Andrew Morton
2019-04-02 23:05 ` [PATCH v5 3/7] slob: Use slab_list instead of lru Tobin C. Harding
2019-04-03 15:47   ` Christopher Lameter
2019-04-03 15:47     ` Christopher Lameter
2019-04-02 23:05 ` [PATCH v5 4/7] slub: Add comments to endif pre-processor macros Tobin C. Harding
2019-04-03 18:42   ` Roman Gushchin
2019-04-02 23:05 ` [PATCH v5 5/7] slub: Use slab_list instead of lru Tobin C. Harding
2019-04-03 18:43   ` Roman Gushchin
2019-04-02 23:05 ` [PATCH v5 6/7] slab: " Tobin C. Harding
2019-04-03 15:48   ` Christopher Lameter
2019-04-03 15:48     ` Christopher Lameter
2019-04-03 18:44   ` Roman Gushchin
2019-04-02 23:05 ` [PATCH v5 7/7] mm: Remove stale comment from page struct Tobin C. Harding
2019-04-03 18:45   ` Roman Gushchin
2019-04-09 13:07 ` [PATCH v5 0/7] mm: Use slab_list list_head instead of lru Vlastimil Babka

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.