linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: yangerkun <yangerkun@huawei.com>,
	stable@vger.kernel.org, vbabka@suse.cz, linux-mm@kvack.org,
	open-iscsi@googlegroups.com, cleech@redhat.com,
	"zhangyi (F)" <yi.zhang@huawei.com>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	liuyongqiang13@huawei.com,
	"Zhengyejian (Zetta)" <zhengyejian1@huawei.com>,
	Yang Yingliang <yangyingliang@huawei.com>,
	chenzhou10@huawei.com
Subject: Re: [QUESTION] WARNNING after 3d8e2128f26a ("sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output")
Date: Fri, 2 Apr 2021 15:41:20 +0100	[thread overview]
Message-ID: <20210402144120.GO351017@casper.infradead.org> (raw)
In-Reply-To: <YGbLiIL8ewIX1Hrt@kroah.com>

On Fri, Apr 02, 2021 at 09:45:12AM +0200, Greg KH wrote:
> Why is the buffer alignment considered a "waste" here?  If that change
> is in Linus's tree and newer kernels (it showed up in 5.4 which was
> released quite a while ago), where are the people complaining about it
> there?
> 
> I think backporting 59bb47985c1d ("mm, sl[aou]b: guarantee natural
> alignment for kmalloc(power-of-two)") seems like the correct thing to do
> here to bring things into alignment (pun intended) with newer kernels.

It's only a waste for slabs which need things like redzones (eg we could
get 7 512-byte allocations out of a 4kB page with a 64 byte redzone
and no alignment ; with alignment we can only get four).  Since slub
can enable/disable redzones on a per-slab basis, and redzones aren't
terribly interesting now that we have kasan/kfence, nobody really cares.



  reply	other threads:[~2021-04-02 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-02  7:16 yangerkun
2021-04-02  7:24 ` yangerkun
2021-04-02  7:45 ` Greg KH
2021-04-02 14:41   ` Matthew Wilcox [this message]
2021-04-07 12:14     ` yangerkun
2021-04-07 13:21       ` Joe Perches
2021-04-07 13:49         ` yangerkun

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=20210402144120.GO351017@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=chenzhou10@huawei.com \
    --cc=cleech@redhat.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-mm@kvack.org \
    --cc=liuyongqiang13@huawei.com \
    --cc=open-iscsi@googlegroups.com \
    --cc=stable@vger.kernel.org \
    --cc=vbabka@suse.cz \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yangerkun@huawei.com \
    --cc=yangyingliang@huawei.com \
    --cc=yi.zhang@huawei.com \
    --cc=zhengyejian1@huawei.com \
    /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