Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2541611ybl; Sat, 24 Aug 2019 20:26:08 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgfOMpQGKAELQZlq2XU1uxDYxQhEatcLCvwZA/5tsp1KI+dZsQUMW7chH5of7xzLVxtVLw X-Received: by 2002:aa7:97b7:: with SMTP id d23mr13862291pfq.203.1566703568184; Sat, 24 Aug 2019 20:26:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566703568; cv=none; d=google.com; s=arc-20160816; b=vJwSbgKe156hB56ryuxohCP+sA1cNdQ3mOqshxXOvKXvJT69u2HL+HxA/Zoth/OAHZ 8Xv5Pdcer79wfZT3YSBk6smX2RFC06g+kpG3V3YfT6ToaejV0gsx26XeUMbgqzBiKdxz r4HQIp/ejoNJwA8xalrm2b63iwGdRD5fch6aJUpoZgxm2/tr0kGB/I+mtDNWH5UZW52D 7IBUJYq/aKnFB3p6ZDptKdvolgjgiQhslVlYGvyGOYg9CWolpq07G35spp3xUcMTrgKb LXb9SbbMI2UhTHfjnC/DDtNojk8DVajAH8usfut19el8NcaiVpTktN+v4RYnKDoaqEqS NUSw== 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=/MWfHcWxzLptIUXavFqHayFy1whg24mjci9k3fwIzoo=; b=LQVwjeJNoVIdOjjgLVeWzyZHKzib881dvRcKGam2ziIfQdgif3Q8PMoxfU9rmOZpfK Cd7q7kbH1zvmPYue7OXe6vtGoj5UyjI6ttvGQPZnfFhjIZpjBSpgsW2Eq1NrNEKJq/wV uPljaQnD9XIGSQFfvsZyosFRidAtfhRWttr8nTbSEyXesXtQWz6kbobA0id3ZfdAdDC5 YUdGVrjTPXSr77eKJlYWQxytvyH3HVJ4tofTvKA5eLSofZyT29hS5RnXGPWvOnJSb86P Aomf2aPJzvllGFSYnv6CImfyyboImzQ0GvKm38x9UoP4un8JfMwwu6nn/oPxwBDtowlE m9LQ== 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 o33si6382083pld.266.2019.08.24.20.25.46; Sat, 24 Aug 2019 20:26:08 -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 S1727941AbfHYDZn (ORCPT + 99 others); Sat, 24 Aug 2019 23:25:43 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:38571 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727708AbfHYDZm (ORCPT ); Sat, 24 Aug 2019 23:25:42 -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 x7P3POUv029060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 24 Aug 2019 23:25:25 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 7F19A42049E; Sat, 24 Aug 2019 23:25:24 -0400 (EDT) Date: Sat, 24 Aug 2019 23:25:24 -0400 From: "Theodore Y. Ts'o" To: Shaokun Zhang Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Guo , Andreas Dilger Subject: Re: [PATCH] ext4: change the type of ext4 cache stats to percpu_counter to improve performance Message-ID: <20190825032524.GD5163@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 References: <1566528454-13725-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: <1566528454-13725-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 Fri, Aug 23, 2019 at 10:47:34AM +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 > Signed-off-by: Yang Guo > Signed-off-by: Shaokun Zhang Applied with some adjustments so it would apply. I also changed the patch summary to: ext4: use percpu_counters for extent_status cache hits/misses - Ted