From patchwork Mon Aug 26 11:16:25 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 11114381 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2FC481399 for ; Mon, 26 Aug 2019 11:16:45 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 027FF206B7 for ; Mon, 26 Aug 2019 11:16:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 027FF206B7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 3AF636B0565; Mon, 26 Aug 2019 07:16:44 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 338EB6B0567; Mon, 26 Aug 2019 07:16:44 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 24EC46B0568; Mon, 26 Aug 2019 07:16:44 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0236.hostedemail.com [216.40.44.236]) by kanga.kvack.org (Postfix) with ESMTP id F31BA6B0565 for ; Mon, 26 Aug 2019 07:16:43 -0400 (EDT) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id A8891181AC9AE for ; Mon, 26 Aug 2019 11:16:43 +0000 (UTC) X-FDA: 75864326286.11.bird55_1d96a15e4d217 X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,vbabka@suse.cz,:akpm@linux-foundation.org::linux-kernel@vger.kernel.org:cl@linux.com:penberg@kernel.org:rientjes@google.com:ming.lei@redhat.com:david@fromorbit.com:willy@infradead.org:darrick.wong@oracle.com:hch@lst.de:linux-xfs@vger.kernel.org:linux-fsdevel@vger.kernel.org:linux-block@vger.kernel.org:james.bottomley@hansenpartnership.com:linux-btrfs@vger.kernel.org:vbabka@suse.cz,RULES_HIT:30054:30074,0,RBL:195.135.220.15:@suse.cz:.lbl8.mailshell.net-62.14.6.2 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fp,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:28,LUA_SUMMARY:none X-HE-Tag: bird55_1d96a15e4d217 X-Filterd-Recvd-Size: 2196 Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by imf14.hostedemail.com (Postfix) with ESMTP for ; Mon, 26 Aug 2019 11:16:43 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 84FD5AC26; Mon, 26 Aug 2019 11:16:41 +0000 (UTC) From: Vlastimil Babka To: Andrew Morton , linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, Christoph Lameter , Pekka Enberg , David Rientjes , Ming Lei , Dave Chinner , Matthew Wilcox , "Darrick J . Wong" , Christoph Hellwig , linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org, James Bottomley , linux-btrfs@vger.kernel.org, Vlastimil Babka Subject: [PATCH v2 0/2] guarantee natural alignment for kmalloc() Date: Mon, 26 Aug 2019 13:16:25 +0200 Message-Id: <20190826111627.7505-1-vbabka@suse.cz> X-Mailer: git-send-email 2.22.1 MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: After a while, here's v2 of the series, also discussed at LSF/MM [1]. I've updated the documentation bits and expanded changelog. Also measured effect on SLOB, and found it to be within noise. That required first adding some accounting for SLOB, which I believe is useful in general, so that became Patch 1. All other details are in Patch 2 changelog. [1] https://lwn.net/Articles/787740/ Vlastimil Babka (2): mm, sl[ou]b: improve memory accounting mm, sl[aou]b: guarantee natural alignment for kmalloc(power-of-two) Documentation/core-api/memory-allocation.rst | 4 ++ include/linux/slab.h | 4 ++ mm/slab_common.c | 19 +++++- mm/slob.c | 62 +++++++++++++++----- mm/slub.c | 14 ++++- 5 files changed, 82 insertions(+), 21 deletions(-)