Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6561523ybv; Wed, 12 Feb 2020 14:57:16 -0800 (PST) X-Google-Smtp-Source: APXvYqx9m40+r2abpWi2VuwojS4LW03RrwhZnR/ZfVirBkVK6VODx/jiHJX+7nTqpPSbNilGkkwk X-Received: by 2002:a9d:2184:: with SMTP id s4mr10530368otb.121.1581548236145; Wed, 12 Feb 2020 14:57:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1581548236; cv=none; d=google.com; s=arc-20160816; b=mabXV57Lu+L94qv0kSuy2MkTfv2vxymdJGo0voKpmTaXvrxV39ueQtpf0jFFPzUs80 dgeuBaz/zek9GYkWTK8vy5U2J/u+Fcl9XLE94l62YKKIrTSqZ2X0MU9nGJgE25qO3KUw SUSwszwfGI1k+E0Y6OoSSm+ka5tMIPvcaWChUQInEtK2sUjLjGtAT3TFbHK+0WLh2MyQ QB3SEFywndlg5x7rqCtht9dBB7+ohqAZaOS087USeTLWqhPJ5MhRMpAp37qXhmAhEsLg TRu2b22bCVDCp6YGc1oRVWeWHX49WiDrTocteLLuc3hCWlXL04XgepZ+cH37IjjE9xlg ZDqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=8oheyKu/TuXqpzmz45SIUj9KzF5hmDGcRHxzlzjEKLk=; b=XWwdVsP8n49YQxwMjJmEUmcz6LTi2TkmDaWgfGzUzva4a7rChXee8Xj4MBN/o+VonF +FidPbqG0STKWSU4A+fd3Wjz7o6kAI2N+ZX9RSztX2lEiyrn5Mpb7ZEDfaNF/fe90ZGf TNhK9Hxe4oOTOgeV1Sa0uAsi8pWp1dw4PAuN/HMyUdvBGNmEtxJpidgStM6Qmxf9lF7B qc81+TCYi/ROoL1EiI7kRTOrYak/0UDjUS/fBkUCwV9KlzCCdOlzMI0eEBvmjeKHFCDO t8GwTDbl+biCgwbxklPW3vvms707tSh0WNqS8lLUP87OTQQE9+/RI/s/+eSs8nR6zuuo VCTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="gnL3Rr/n"; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z7si122395oth.181.2020.02.12.14.57.04; Wed, 12 Feb 2020 14:57:16 -0800 (PST) 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=@kernel.org header.s=default header.b="gnL3Rr/n"; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729225AbgBLW4R (ORCPT + 99 others); Wed, 12 Feb 2020 17:56:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:42684 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728185AbgBLW4R (ORCPT ); Wed, 12 Feb 2020 17:56:17 -0500 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.