From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B9094C352A4 for ; Wed, 12 Feb 2020 22:56:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7AF5B218AC for ; Wed, 12 Feb 2020 22:56:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="gnL3Rr/n" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AF5B218AC Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2AB236B04C0; Wed, 12 Feb 2020 17:56:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 25C996B04C1; Wed, 12 Feb 2020 17:56:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 14BD66B04C2; Wed, 12 Feb 2020 17:56:18 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id ED9486B04C0 for ; Wed, 12 Feb 2020 17:56:17 -0500 (EST) Received: from smtpin04.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id B67A32C33 for ; Wed, 12 Feb 2020 22:56:17 +0000 (UTC) X-FDA: 76482985194.04.owl45_19d004bcca636 X-HE-Tag: owl45_19d004bcca636 X-Filterd-Recvd-Size: 2623 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf42.hostedemail.com (Postfix) with ESMTP for ; Wed, 12 Feb 2020 22:56:17 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4FF592173E; Wed, 12 Feb 2020 22:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581548176; bh=mTJZ+UJfMT24SAW6HUVPaH/0W+EjuQ/Qksp9vL1UmDs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=gnL3Rr/nGogf72hp1kDcNGDR6W17loTSy71/2IsyhZorCKrzy6xx2QvuBuJiq2r7o ILzvJR6yiF0KRWR9fMRHfO/s2zGrRNBjj5gpZwyOQPcLnLzEiC9Z8O60UM1Fp2U7bZ GYy2uyMjkYdTALoZiyWGZL7umma+8n/WuM5iRON4= Date: Wed, 12 Feb 2020 14:56:15 -0800 From: Andrew Morton To: Christopher Lameter Cc: Wen Yang , Pekka Enberg , David Rientjes , Joonsoo Kim , Xunlei Pang , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mm/slub: Detach node lock from counting free objects Message-Id: <20200212145615.3518e29ec90d580817c14dc8@linux-foundation.org> In-Reply-To: References: <20200201031502.92218-1-wenyang@linux.alibaba.com> <5373ce28-c369-4e40-11dd-b269e4d2cb24@linux.alibaba.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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: On Sat, 8 Feb 2020 21:41:49 +0000 (UTC) Christopher Lameter wrote: > On Sat, 8 Feb 2020, Wen Yang wrote: > > > I would greatly appreciate it if you kindly give me some feedback on this > > patch. > > I think the measure is too severe given its use and the general impact on code. Severe in what way? It's really a quite simple change, although quite a few edits were needed. > Maybe avoid taking the lock or reducing the time a lock is taken when reading /proc/slabinfo is > the best approach? > > Also you could cache the value in the userspace application? Why is this > value read continually? : reading "/proc/slabinfo" can possibly block the slab allocation on : another CPU for a while, 200ms in extreme cases That was bad of us. It would be good to stop doing this.