Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp4316868imj; Tue, 12 Feb 2019 13:43:41 -0800 (PST) X-Google-Smtp-Source: AHgI3IYV8NG1x71HKoDarySe8lsu5vCW6Rm/jMrhepRcLKDQIysP384itCviekDgETN5z0W3n6MH X-Received: by 2002:a17:902:7592:: with SMTP id j18mr6005085pll.289.1550007821377; Tue, 12 Feb 2019 13:43:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550007821; cv=none; d=google.com; s=arc-20160816; b=yso4p9IvAFIS/htTUABnXA1h8vmL1H/Q/lOOuWGAu3U+0o07zOCcbgeYFelKmEQ2MG 32J5PJxej8nb6bT4jKgKrJ3ZOOKIMCv10TcVj2pYstlVFGdR0M7AkW+j2xsT/MekpFuO XGK1JFDrVSIrBOPp6bF6HDhlKX4w+5G4/2m0Cy6xov6B4rBgnGrk1JbAEK4x4vNPGo+W scTjhaYi86uTod58sSj+udlzmb9ATWJa4QOe3wEm+cInssSi7VLGzcWGL9iwAswreGw4 c44ZznGHLW6I7UTqjd46VvO+k4Bnj6W1CXCVvsD8YbzQkJpIRQq9MnK8GPtC5MZR5Obp 7ofQ== 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; bh=16C3eL5Ef2km9fElYxdCDMJDpLR4cD42eFnKWgSzkro=; b=cWtnAmlBySycgihEDAs/urUZrs+uAd0zVtHGOgxkKolL0ovsKf1O+GG+/UflqwQU9g EunjinSAwzKF809GLVPpv+ve9prSRtEq5MLhhRRXhHehsyOft5sl7s7iHSqmsNQvstCK 2o9jJCRfnEZ6lxXf3vTnmCM9HJy45qcu+qxKSKnP3zzRoI7P0n2fvjYFuejU5rhrIwE6 rtlYKevQ/K29bPwaMZYFlXIMOM9TTqIXHvhZ0W6cVM4AteYJhgwoXsMntqryNqwY35Vz yj8IpTGoNd+Pqy+pc31Tyt8nKvLiThB0fJaTcdL1txXVpmziwputaLAD838azG95lSXX DMrg== ARC-Authentication-Results: i=1; mx.google.com; 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 i30si13223835pgm.76.2019.02.12.13.42.44; Tue, 12 Feb 2019 13:43:41 -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; 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 S1730360AbfBLUeL (ORCPT + 99 others); Tue, 12 Feb 2019 15:34:11 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:48872 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727218AbfBLUeL (ORCPT ); Tue, 12 Feb 2019 15:34:11 -0500 Received: from akpm3.svl.corp.google.com (unknown [104.133.8.65]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 72BA5E132; Tue, 12 Feb 2019 20:34:10 +0000 (UTC) Date: Tue, 12 Feb 2019 12:34:09 -0800 From: Andrew Morton To: Johannes Weiner Cc: Roman Gushchin , linux-mm@kvack.org, Matthew Wilcox , kernel-team@fb.com, linux-kernel@vger.kernel.org, Roman Gushchin Subject: Re: [PATCH v2 0/3] vmalloc enhancements Message-Id: <20190212123409.7ed5c34d68466dbd8b7013a3@linux-foundation.org> In-Reply-To: <20190212184724.GA18339@cmpxchg.org> References: <20190212175648.28738-1-guro@fb.com> <20190212184724.GA18339@cmpxchg.org> X-Mailer: Sylpheed 3.6.0 (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 Tue, 12 Feb 2019 13:47:24 -0500 Johannes Weiner wrote: > On Tue, Feb 12, 2019 at 09:56:45AM -0800, Roman Gushchin wrote: > > The patchset contains few changes to the vmalloc code, which are > > leading to some performance gains and code simplification. > > > > Also, it exports a number of pages, used by vmalloc(), > > in /proc/meminfo. > > > > Patch (1) removes some redundancy on __vunmap(). > > Patch (2) separates memory allocation and data initialization > > in alloc_vmap_area() > > Patch (3) adds vmalloc counter to /proc/meminfo. > > > > v2->v1: > > - rebased on top of current mm tree > > - switch from atomic to percpu vmalloc page counter > > I don't understand what prompted this change to percpu counters. > > All writers already write vmap_area_lock and vmap_area_list, so it's > not really saving much. The for_each_possible_cpu() for /proc/meminfo > on the other hand is troublesome. percpu_counters would fit here. They have probably-unneeded locking but I expect that will be acceptable. And they address the issues with for_each_possible_cpu() avoidance, CPU hotplug and transient negative values.