linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/5] EDAC: Remove edac_align_ptr()
@ 2022-03-10  9:52 Borislav Petkov
  2022-03-10  9:52 ` [PATCH 1/5] EDAC/mc: Get rid of silly one-shot struct allocation in edac_mc_alloc() Borislav Petkov
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Borislav Petkov @ 2022-03-10  9:52 UTC (permalink / raw)
  To: linux-edac; +Cc: LKML

From: Borislav Petkov <bp@suse.de>

Hi,

this edac_align_ptr() thing was part of the original EDAC upstreaming
effort in 2006:

  da9bb1d27b21 ("[PATCH] EDAC: core EDAC support code")

Comment above the usage says:

"Everything is kmalloc'ed as one big chunk - more efficient."

but I don't think that "efficiency" is measurable anymore. Then, 15+
years ago probably.

So get rid of it in favor of simple kzalloc() allocations for the couple
of structures needed at each call site.

It boots fine here with amd64_edac but I'd greatly appreciate testing
with other EDAC drivers.

Thx!

Borislav Petkov (5):
  EDAC/mc: Get rid of silly one-shot struct allocation in
    edac_mc_alloc()
  EDAC/pci: Get rid of the silly one-shot memory allocation in
    edac_pci_alloc_ctl_info()
  EDAC/device: Get rid of the silly one-shot memory allocation in
    edac_device_alloc_ctl_info()
  EDAC/device: Sanitize edac_device_alloc_ctl_info() definition
  EDAC/mc: Get rid of edac_align_ptr()

 drivers/edac/edac_device.c       | 135 +++++++++++++------------------
 drivers/edac/edac_device.h       |  14 ++++
 drivers/edac/edac_device_sysfs.c |   5 +-
 drivers/edac/edac_mc.c           |  96 +++-------------------
 drivers/edac/edac_module.h       |   2 -
 drivers/edac/edac_pci.c          |  25 +++---
 6 files changed, 95 insertions(+), 182 deletions(-)

-- 
2.29.2


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

end of thread, other threads:[~2022-03-10  9:53 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-10  9:52 [PATCH 0/5] EDAC: Remove edac_align_ptr() Borislav Petkov
2022-03-10  9:52 ` [PATCH 1/5] EDAC/mc: Get rid of silly one-shot struct allocation in edac_mc_alloc() Borislav Petkov
2022-03-10  9:52 ` [PATCH 2/5] EDAC/pci: Get rid of the silly one-shot memory allocation in edac_pci_alloc_ctl_info() Borislav Petkov
2022-03-10  9:52 ` [PATCH 3/5] EDAC/device: Get rid of the silly one-shot memory allocation in edac_device_alloc_ctl_info() Borislav Petkov
2022-03-10  9:52 ` [PATCH 4/5] EDAC/device: Sanitize edac_device_alloc_ctl_info() definition Borislav Petkov
2022-03-10  9:52 ` [PATCH 5/5] EDAC/mc: Get rid of edac_align_ptr() Borislav Petkov

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).