Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp1008203ybl; Wed, 28 Aug 2019 08:21:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqy3GrJ+HAIhfQwfekDTJ0nL8HYvxzhu4es/wZTcHCv2wkfGpe+l05CeomCV+YTRuSZkpB06 X-Received: by 2002:aa7:988a:: with SMTP id r10mr5084993pfl.253.1567005674628; Wed, 28 Aug 2019 08:21:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1567005674; cv=none; d=google.com; s=arc-20160816; b=OCoChpMt6EucimQVfNkcYW6Z8vgGbVAkbdMzM2RyN6hwJRbdK96+H6F04N3kXqJraW RR+7wu3qJFrqVldVnN5Y5iGm3Z25oQzUL2BTezYaYi7x4HDzkjy4tUC4aEtavnBdQPiE nSIwcPjExd5/yQtqHezKSyHoqu7ko3l/CxNNfkNIlY7MQ4J5Aynof7SGBzABz8dDdEAW SNIRrlTZzHtuFKY4ud6OODyHwMoAWS4wKo9ZSIEVdeu3YH6xt0c3wJsrK0lRS33kQ5Kl B1IWLyswFZ3MDJJ/6Grdz+Df9a5XZs1Yl94aG6MqmMh2y+lKiC6H40NAN9uNiMa7riln q9Rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:mail-followup-to:message-id:subject:cc:to:from:date; bh=QDxQ74PCvOwhNwXM4RAg248ZhKGcili6zRk/lOXd9jc=; b=Y2/k+PbFMv3560HS1DtXwJRT5U8F54QcWjRVM8A9WGU4p3jmaQoL+bDNsr7LNjzy34 kWztDkkvJM0Fc51qAOJkjCvnVJFjkdDrAA7w76zUoBfl3ff+emmi6Gg4BoGqjVnkB8uu zoF1GeSpJRC3imDeHj8niirsemSoCGr/nh0H0xKphC8q6PNQyNB2aHUF0g9R/4ltj6MV D8OGUeI63Wmv611pZ2yg8BuHsU86/5e7dtK9vV2QBYv8pXuaWmHuXTwOgXIlb8CuK8qH mILQgon4npw4OGLmhSxzC1aeETcilCyZosoGMmY3h/qbs83bKSQ8V6DP2nbJDT930DPW w0+A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 h19si2932910pfq.118.2019.08.28.08.20.59; Wed, 28 Aug 2019 08:21:14 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbfH1PUo (ORCPT + 99 others); Wed, 28 Aug 2019 11:20:44 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:33585 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726586AbfH1PUo (ORCPT ); Wed, 28 Aug 2019 11:20:44 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-111.corp.google.com [104.133.0.111] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x7SFKN5S009354 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 28 Aug 2019 11:20:24 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 66ABA42049E; Wed, 28 Aug 2019 11:20:23 -0400 (EDT) Date: Wed, 28 Aug 2019 11:20:23 -0400 From: "Theodore Y. Ts'o" To: Shaokun Zhang Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Guo , Andreas Dilger , Eric Biggers Subject: Re: [PATCH v2] ext4: use percpu_counters for extent_status cache hits/misses Message-ID: <20190828152023.GG24857@mit.edu> Mail-Followup-To: "Theodore Y. Ts'o" , Shaokun Zhang , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Guo , Andreas Dilger , Eric Biggers References: <1566983957-6608-1-git-send-email-zhangshaokun@hisilicon.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1566983957-6608-1-git-send-email-zhangshaokun@hisilicon.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Aug 28, 2019 at 05:19:17PM +0800, Shaokun Zhang wrote: > From: Yang Guo > > @es_stats_cache_hits and @es_stats_cache_misses are accessed frequently in > ext4_es_lookup_extent function, it would influence the ext4 read/write > performance in NUMA system. Let's optimize it using percpu_counter, > it is profitable for the performance. > > The test command is as below: > fio -name=randwrite -numjobs=8 -filename=/mnt/test1 -rw=randwrite > -ioengine=libaio -direct=1 -iodepth=64 -sync=0 -norandommap > -group_reporting -runtime=120 -time_based -bs=4k -size=5G > > And the result is better 10% than the initial implement: > without the patch,IOPS=197k, BW=770MiB/s (808MB/s)(90.3GiB/120002msec) > with the patch, IOPS=218k, BW=852MiB/s (894MB/s)(99.9GiB/120002msec) > > Cc: "Theodore Ts'o" > Cc: Andreas Dilger > Cc: Eric Biggers > Signed-off-by: Yang Guo > Signed-off-by: Shaokun Zhang Thanks, applied. - Ted