All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/5] simple sort swap function improvements
@ 2019-03-31 18:28 ` Andrey Abramov
  0 siblings, 0 replies; 38+ messages in thread
From: Andrey Abramov @ 2019-03-31 18:28 UTC (permalink / raw)
  To: vgupta, benh, paulus, mpe, tglx, mingo, bp, hpa, x86, mark,
	jlbec, richard, dedekind1, adrian.hunter, gregkh, naveen.n.rao,
	jpoimboe, Dave Chinner, darrick.wong, ard.biesheuvel,
	George Spelvin, linux-snps-arc, Linux Kernel Mailing List,
	linuxppc-dev, ocfs2-devel, linux-mtd, sfr
  Cc: peterz, mhocko, ashish.samant, keescook, jannh, malat,
	Rasmus Villemoes, amir73il, yuehaibing, jiangyiwen, npiggin,
	rppt, piaojun, yamada.masahiro, ge.changwei, Morton Andrew,
	Andy Shevchenko, jslaby, kamalesh, gustavo

This is the logical continuation of the "lib/sort & lib/list_sort:
faster and smaller" series by George Spelvin (added to linux-next
recently).

Since Spectre mitigations have made indirect function calls more
expensive, and the previous patch series implements the default
simple byte copies without them, an "optimized" custom swap
function is now a waste of time as well as code.

Patches 1 to 4 replace trivial swap functions with the built-in
(which is now much faster) and are grouped by subsystem.
Being pure code deletion patches, they are sure to bring joy to
Linus's heart.

Having reviewed all call sites, only three non-trivial swap
functions remain:  arch/x86/kernel/unwind_orc.c,
kernel/jump_label.c and lib/extable.c.

Patch #5 takes the opportunity to clean up a long-standing
interface wart: the swap function's size parameter was an int,
which doesn't match the size_t element size passed to sort()
function itself.  So change it to size_t.

v1->v2: Only commit messages have changed to better explain
	the purpose of commits. (Thanks to George Spelvin and Greg KH)

Andrey Abramov (5):
  arch/arc: unwind.c: replace swap function with built-in one
  powerpc: module_[32|64].c: replace swap function with built-in one
  ocfs2: dir,refcounttree,xattr: replace swap functions with built-in
    one
  ubifs: find.c: replace swap function with built-in one
  Lib: sort.h: replace int size with size_t size in the swap function

 arch/arc/kernel/unwind.c        | 20 ++------------------
 arch/powerpc/kernel/module_32.c | 17 +----------------
 arch/powerpc/kernel/module_64.c | 17 +----------------
 arch/x86/kernel/unwind_orc.c    |  2 +-
 fs/ocfs2/dir.c                  | 13 +------------
 fs/ocfs2/refcounttree.c         | 13 +++----------
 fs/ocfs2/xattr.c                | 15 +++------------
 fs/ubifs/find.c                 |  9 +--------
 include/linux/sort.h            |  2 +-
 kernel/jump_label.c             |  2 +-
 lib/extable.c                   |  2 +-
 lib/sort.c                      |  6 +++---
 12 files changed, 19 insertions(+), 99 deletions(-)

-- 
2.21.0



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

end of thread, other threads:[~2019-04-01 17:55 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-31 18:28 [PATCH v2 0/5] simple sort swap function improvements Andrey Abramov
2019-03-31 18:28 ` Andrey Abramov
2019-03-31 18:28 ` Andrey Abramov
2019-03-31 18:31 ` [PATCH v2 1/5] arch/arc: unwind.c: replace swap function with built-in one Andrey Abramov
2019-03-31 18:31   ` Andrey Abramov
2019-03-31 18:31   ` Andrey Abramov
2019-04-01 17:53   ` Vineet Gupta
2019-04-01 17:53     ` Vineet Gupta
2019-04-01 17:53     ` Vineet Gupta
2019-03-31 18:35 ` [PATCH v2 2/5] powerpc: module_[32|64].c: " Andrey Abramov
2019-03-31 18:35   ` Andrey Abramov
2019-03-31 18:35   ` Andrey Abramov
2019-04-01 11:08   ` Michael Ellerman
2019-04-01 11:08     ` Michael Ellerman
2019-04-01 11:08     ` Michael Ellerman
2019-04-01 11:08     ` Michael Ellerman
2019-03-31 18:42 ` [PATCH v2 3/5] ocfs2: dir, refcounttree, xattr: replace swap functions " Andrey Abramov
2019-03-31 18:42   ` Andrey Abramov
2019-03-31 18:42   ` Andrey Abramov
2019-03-31 18:47 ` [PATCH v2 4/5] ubifs: find.c: replace swap function " Andrey Abramov
2019-03-31 18:47   ` Andrey Abramov
2019-03-31 18:47   ` Andrey Abramov
2019-03-31 18:52 ` [PATCH v2 5/5] Lib: sort.h: replace int size with size_t size in the swap function Andrey Abramov
2019-03-31 18:52   ` Andrey Abramov
2019-03-31 18:52   ` Andrey Abramov
2019-04-01  9:35   ` Andy Shevchenko
2019-04-01  9:35     ` Andy Shevchenko
2019-04-01  9:35     ` Andy Shevchenko
2019-04-01  9:35     ` Andy Shevchenko
2019-04-01  9:56     ` George Spelvin
2019-04-01  9:56       ` George Spelvin
2019-04-01  9:56       ` George Spelvin
2019-04-01  9:56       ` George Spelvin
2019-04-01 10:28       ` Andy Shevchenko
2019-04-01 10:28         ` Andy Shevchenko
2019-04-01 10:28         ` Andy Shevchenko
2019-04-01 10:28         ` Andy Shevchenko
2019-04-01  9:25 ` [PATCH v2 0/5] simple sort swap function improvements Andy Shevchenko

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.