From patchwork Wed Jun 10 16:31:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vlastimil Babka X-Patchwork-Id: 11598279 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 F1CB01391 for ; Wed, 10 Jun 2020 16:31:54 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C890220823 for ; Wed, 10 Jun 2020 16:31:54 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C890220823 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 D91426B005C; Wed, 10 Jun 2020 12:31:53 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id D417B6B005D; Wed, 10 Jun 2020 12:31:53 -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 C0A536B0062; Wed, 10 Jun 2020 12:31:53 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0032.hostedemail.com [216.40.44.32]) by kanga.kvack.org (Postfix) with ESMTP id A8D1F6B005C for ; Wed, 10 Jun 2020 12:31:53 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 7551C804BC34 for ; Wed, 10 Jun 2020 16:31:53 +0000 (UTC) X-FDA: 76913843706.09.voice80_4c09e2226dcc Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 4F62318024DC7 for ; Wed, 10 Jun 2020 16:31:53 +0000 (UTC) X-Spam-Summary: 1,0,0,,d41d8cd98f00b204,vbabka@suse.cz,,RULES_HIT:30054:30074,0,RBL:195.135.220.15:@suse.cz:.lbl8.mailshell.net-64.100.201.201 62.2.6.2,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:25,LUA_SUMMARY:none X-HE-Tag: voice80_4c09e2226dcc X-Filterd-Recvd-Size: 3786 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf13.hostedemail.com (Postfix) with ESMTP for ; Wed, 10 Jun 2020 16:31:52 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id C13F8ACAE; Wed, 10 Jun 2020 16:31:53 +0000 (UTC) From: Vlastimil Babka To: Andrew Morton , Christoph Lameter , Pekka Enberg , David Rientjes , Joonsoo Kim Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@android.com, vinmenon@codeaurora.org, Kees Cook , Matthew Garrett , Roman Gushchin , Vlastimil Babka , Jann Horn , Vijayanand Jitta Subject: [PATCH 0/9] slub_debug fixes and improvements Date: Wed, 10 Jun 2020 18:31:26 +0200 Message-Id: <20200610163135.17364-1-vbabka@suse.cz> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Rspamd-Queue-Id: 4F62318024DC7 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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: Hi, this series puts together the recent series "replace runtime slub_debug toggling with more capable boot parameter" [4] (no longer RFC, thanks for reviews), with older RFC [5] to introduce a static key for slub_debug. It's because the removal of runtime toggling makes the static key addition simpler. The last patch improves cache_from_obj() based on recent debugging effort [6]. We had recently reports [1,2] of troubles with runtime writes to various SLUB per-cache sysfs files related to slub_debug or tuning leading to crashes. I have inspected all those writable files and the rather unfortunate result is that most of them are made read-only by this patchset, as fixing the issues doesn't seem viable. Details for each are given in each patch (2-5) The runtime toggles were however necessary for the use case described in [3], so the first patch extends the slub_debug boot parameter syntax to achieve the same configuration without runtime toggles. That should hopefully make the changes more feasible. Patches 6-9 reduce slub_debug overhead in cases where it's compiled in but not enabled during boot, with a static key. Patch 9 also improves bug reporting in cache_from_obj(). [1] https://lkml.kernel.org/r/1580379523-32272-1-git-send-email-vjitta@codeaurora.org [2] https://lore.kernel.org/r/CAG48ez31PP--h6_FzVyfJ4H86QYczAFPdxtJHUEEan+7VJETAQ@mail.gmail.com [3] https://lore.kernel.org/r/1383cd32-1ddc-4dac-b5f8-9c42282fa81c@codeaurora.org [4] https://lore.kernel.org/r/20200602141519.7099-1-vbabka@suse.cz [5] https://lore.kernel.org/r/20190404091531.9815-1-vbabka@suse.cz [6] https://lore.kernel.org/r/4dc93ff8-f86e-f4c9-ebeb-6d3153a78d03@oracle.com Vlastimil Babka (9): mm, slub: extend slub_debug syntax for multiple blocks mm, slub: make some slub_debug related attributes read-only mm, slub: remove runtime allocation order changes mm, slub: make remaining slub_debug related attributes read-only mm, slub: make reclaim_account attribute read-only mm, slub: introduce static key for slub_debug() mm, slub: introduce kmem_cache_debug_flags() mm, slub: extend checks guarded by slub_debug static key mm, slab/slub: move and improve cache_from_obj() .../admin-guide/kernel-parameters.txt | 2 +- Documentation/vm/slub.rst | 37 +- mm/slab.c | 8 + mm/slab.h | 23 -- mm/slub.c | 374 +++++++++--------- 5 files changed, 222 insertions(+), 222 deletions(-)