Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1327033pxb; Wed, 10 Feb 2021 06:05:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwtJP/rlJkhN4hUvi1OGKRP/PqcU74hYGzO0+hKIxk8fjGGyz56VMkdtIGFcfdwrOuaiacU X-Received: by 2002:a17:907:d86:: with SMTP id go6mr2955946ejc.337.1612965907547; Wed, 10 Feb 2021 06:05:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612965907; cv=none; d=google.com; s=arc-20160816; b=cfWg0wAeR4VfYC9oK6Oer/QZ29vSTe1IfO84hmPpOF2pyVzaru1OJ2vMMDDI+mGPUH LLXVXuk4kFzxyoy6N1D3Sj1GpwaxILeYct824Qg0bxT/iHVed/Tm2C2ON6nA/GguwF9v gND2thu+0MRa+sJbeqWApKyWZfsLoUfHQpwEsVuSKhn3hJ7CNEPyoNJqvh/hbGZmPc/S Jwy2iYXe0CthWDoWD2yl1SEIEuxbGmOX7RqgNVW01o006A5yr0NrMb1iymq2b3aOv4NP HD9Y3dYDKjFStJYgHJXO8kXgr25Wu6vaY9IghpW+f4+KyCmIgHbxawXxoc5WpXQDk5oQ w/ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jIR0M4dJ9rItSYLNg+quJCjKl0hbaPUe4Y4+W4LWXyo=; b=O6WHW+gaPR9Fi6+JAUNDej8D2+3zhEUD79AbVjz/OnH69gO0vxlBBpS1rbY3ZUBYNi FPUA6rt2FwZpcALqOPXSUC9BykdrPJ4b/w/Fpf0bjfRpEYBiRn21JfLUv+zAd8DOd1NF NT9/sNVYLa2SBZumlm4RIFdN5nkRQp8CCfitmKffRcwgpEYCDrTZa1b5vzMDyG7SuQqm HL+VX4mkkMICcw8EL5zXqTHwyZPc0QeFuxYrqr97WRyavNUOEutrdBCmxyQFrfceNcDe 0gYvRjeot9kzUahyy03On9GRCd3tJwuRkq+oFWaAUwZ7iENwgV+UVngTgNrespusy56I WNew== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id v12si1352133ejb.566.2021.02.10.06.04.43; Wed, 10 Feb 2021 06:05:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbhBJOCu (ORCPT + 99 others); Wed, 10 Feb 2021 09:02:50 -0500 Received: from mx2.suse.de ([195.135.220.15]:47212 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231822AbhBJOA7 (ORCPT ); Wed, 10 Feb 2021 09:00:59 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id A7A47AE1B; Wed, 10 Feb 2021 14:00:16 +0000 (UTC) Date: Wed, 10 Feb 2021 14:00:15 +0000 From: Michal Rostecki To: Anand Jain Cc: Chris Mason , Josef Bacik , David Sterba , "open list:BTRFS FILE SYSTEM" , open list , Michal Rostecki Subject: Re: [PATCH RFC 0/6] Add roundrobin raid1 read policy Message-ID: <20210210140015.GE23499@wotan.suse.de> References: <20210209203041.21493-1-mrostecki@suse.de> <4f24ef7f-c1cf-3cda-b12f-a2c8c84a7e45@oracle.com> <20210210121853.GA23499@wotan.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210210121853.GA23499@wotan.suse.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Feb 10, 2021 at 12:18:53PM +0000, Michal Rostecki wrote: > > These patches look good. But as only round-robin policy requires > > to monitor the inflight and last-offset. Could you bring them under > > if policy=roundrobin? Otherwise, it is just a waste of CPU cycles > > if the policy != roundrobin. > > > > If I bring those stats under if policy=roundrobin, they are going to be > inaccurate if someone switches policies on the running system, after > doing any I/O in that filesystem. > > I'm open to suggestions how can I make those stats as lightweight as > possible. Unfortunately, I don't think I can store the last physical > location without atomic_t. > > The BIO percpu counter is probably the least to be worried about, though > I could maybe get rid of it entirely in favor of using part_stat_read(). > Actually, after thinking about that more, I'm wondering if I should just drop the last-offset stat and penalty mechanism entirely. They seem to improve performance slightly only on mixed workloads (thought I need to check if that's the case in all-SDD od all NVMe arrays), but still perform worse than policies that you proposed. Maybe it'd be better if I just focus on getting the best performance on non-mixed environments in my policy and thus stick to the simple `inflight < queue_depth` check... Thanks, Michal