public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: linux-edac <linux-edac@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH 0/5] EDAC: Remove edac_align_ptr()
Date: Thu, 10 Mar 2022 10:52:49 +0100	[thread overview]
Message-ID: <20220310095254.1510-1-bp@alien8.de> (raw)

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


             reply	other threads:[~2022-03-10  9:53 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-10  9:52 Borislav Petkov [this message]
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

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=20220310095254.1510-1-bp@alien8.de \
    --to=bp@alien8.de \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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