Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp5776035ybe; Tue, 17 Sep 2019 13:19:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqwaHM29DdHYPhfRdBQtOlVrHQd7rmiKN1R40FkEzCrPrBRyc6pKXFKi+d9sJkMVQUXT6Ffz X-Received: by 2002:a17:906:4c4c:: with SMTP id d12mr6451246ejw.174.1568751591003; Tue, 17 Sep 2019 13:19:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568751590; cv=none; d=google.com; s=arc-20160816; b=VQ0FYQ58FLJpglT/RI05mJVY1chXofoNLvrgXajI6pBvxupV8CNWwhSYYDktHGGa5B w0ACLnJMOuIppZLmV8cG6iTRK6MGSOSxGvD0ibX1DxTXJY3eMAzObd5SyoRL4L5W18jL 6rl0CYh4uq4LP5TXK94v83BAcKHb7kGrE2R6/Tn8bbYThO4pzwaeHVrGOJTlZ3iekDdy VICfQLo5Td94h4r8+p0VFmFKFMI0JhsCSk85RI6aCBQr0Tst2AzIXO46RA8NBEF2MN86 wRrlrw3iiIM9N699kHJyWGrM8/jdFLT91P3myCMGjAySkMQ9N2DkbfipMXsMhepX1kJc ifDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=3rykt/1KJ5ehZkESnXZf1dXhmnmIju1zBiNgI4nTTZY=; b=YquGum7JMCEAS5tzW8xuMJ8uilJYgR3nmDbxWDjt6QwWuM3EaCiuIGb0hH6WEBTOSc XzTMLcbGd1Em6nwbT0USjzDEwl7+jbMWdUFKC+vE32s/vnvHR4pB9Lu2TFFVYd7n4s3I AFbt5jDv6IOTCHmHhBFjtNdG3+EwK9QNUIW8KG85+7zk+joEJaVWggvXgADEVhJNQtrg dhzlsLXahakT6TwaZA4bi98LXIHIvCqQdbvuINCyN/B4N/khniccg4G1cZi6mGxWcw8Q osm4crDEFudeENX2B+rv98f0P57ReQKpW6hI6CVm+Wb33iZUD0R9IxHEuZWI2f+VSGep ca7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TSdkOPQ3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m14si1792740ejq.70.2019.09.17.13.19.27; Tue, 17 Sep 2019 13:19:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=TSdkOPQ3; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728659AbfIQUIh (ORCPT + 99 others); Tue, 17 Sep 2019 16:08:37 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:44815 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726806AbfIQUIh (ORCPT ); Tue, 17 Sep 2019 16:08:37 -0400 Received: by mail-pg1-f194.google.com with SMTP id i18so2557100pgl.11 for ; Tue, 17 Sep 2019 13:08:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=3rykt/1KJ5ehZkESnXZf1dXhmnmIju1zBiNgI4nTTZY=; b=TSdkOPQ3dnS7XsEBM4T8FLGSJbblBcQ8CqeHpDRJRWz6kGM9Y/BwnlNO5Cnbeqz5kr mhDWfTq/aVmkEiyNfxDKdk/EFBPhLuI3Yw3H/t/AvVYIcfNULTN1DlX3YV5a2mxQOz9g AzAnfV3SBZx4x93pTefjHnmpefg8ZIBHmgiLEJMArI8P3rGC0XMlPj3iaQEyZ66SibQH hlDls4klP/AOVVUD0VH3q/Ovn0EgyXG7F2CuT0JnAr1iylPEfFyo0LwW8vxbXDKLwXKW hN3XLeKaAOUQvQScru+RI1YpJNtFzOSDEPZ+HkIN0in29GnIRKwT1ldIHrFR8Tjf6VGT XSPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=3rykt/1KJ5ehZkESnXZf1dXhmnmIju1zBiNgI4nTTZY=; b=VXOqx39p3wkCZveomltcE8+Hk2rnKIkbhpL14G262huCPQfdAd5UWTwYMXDCP8ahbb +LCRNFI2AAFaL14Kxzu+VjlskhUK6L5O9Go22Mn/vE1bDINbeOfRZ+mJA5aPZ9ZTj2CO 52zIxmMaWxI5B2pFW8Zaa4sqOhVGdyBRwj/4SPC96S9rqnmGOOpxlzuzhkkiCQRLCDL4 YLjXkBxVa0rHH7LhZHQqxIwqEbTODqAULlKJ43Dz+hdP2AoMW6+Cn4jIDWN32w7Wx+yJ dbbOWo91KRVZdWDIiAN39iXk31lgA/WI2nV+yetA6Lg/gG8nu0BcVYfFX7b+f16GFyJ9 brKA== X-Gm-Message-State: APjAAAV8TzC+H+i2r21EAReKj4a1grg+58Q6hzcqNHbgBgCT1xwiwFzv DWiLIgn2m5w9Vp+5SJBN3d4Y1Q== X-Received: by 2002:a17:90a:154f:: with SMTP id y15mr6896302pja.73.1568750916333; Tue, 17 Sep 2019 13:08:36 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id w187sm2875155pgw.88.2019.09.17.13.08.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 Sep 2019 13:08:35 -0700 (PDT) Date: Tue, 17 Sep 2019 13:08:34 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Qian Cai cc: Pengfei Li , cl@linux.com, penberg@kernel.org, Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] mm/slub: remove left-over debugging code In-Reply-To: <1568727601.5576.160.camel@lca.pw> Message-ID: References: <1568650294-8579-1-git-send-email-cai@lca.pw> <1568727601.5576.160.camel@lca.pw> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 17 Sep 2019, Qian Cai wrote: > > The cmpxchg failures could likely be more generalized beyond SLUB since > > there will be other dependencies in the kernel than just this allocator. > > OK, SLUB_RESILIENCY_TEST is fine to keep around and maybe be turned into a > Kconfig option to make it more visible. > > Is it fine to remove SLUB_DEBUG_CMPXCHG? If somebody later want to generalize it > beyond SLUB, he/she can always find the old code somewhere anyway. > Beyond the fact that your patch doesn't compile, slub is the most notable (only?) user of double cmpxchg in the kernel so generalizing it would only serve to add more indirection at the moment. If/when it becomes more widely used, we can have a discussion about generalizing it so that we can detect failures even when SLUB is not used. Note that the primary purpose of the option is to diagnose issues when the CMPXCHG_DOUBLE_FAIL is observed. If we encounter that, we wouldn't have any diagnostic tools to look deeper without adding this code back. So I don't think anything around cmpxchg failure notifications needs to be changed right now.