Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1714196ybz; Thu, 16 Apr 2020 14:15:09 -0700 (PDT) X-Google-Smtp-Source: APiQypLj2+w5OI16YXaS5avHp3+vea3Yf/xWKpJh9jHo0+dZY4Gy2swjoZy1R8GUyhgENJsaic8J X-Received: by 2002:a50:fe05:: with SMTP id f5mr151261edt.338.1587071708886; Thu, 16 Apr 2020 14:15:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587071708; cv=none; d=google.com; s=arc-20160816; b=N6+Bj1Iz1B8sUYQ5HkMbjyrhLuL2HWcj/Hxqwemo1jNSHj0bRhCc58CIq5b+JF2Jdx EXANH3QM3EyPHQBqnenLxt42fNdOAvA2pndAcFQx8MomIYr9/TlKB+CGtAtk6eFsqWow cXCbFXbFucszS607Tt+jTKK4p5K4nVbjsUJmDBNTacBBi00trpJREwJOZ/JQ4Fi07EDf GR+hPJjYhk943/tqZ/N1qnTgseaFyjUslQMG82HGxW35nl/K5E/odjZyhJfnEgtlmx3q ZrDz0SAqyPjoh/RGw0CLsA+Gy5uZSgNPk7j/MWC2fIiRxSVnTRgz8zcPIRtOuU1yiYqa Ox3A== 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 :message-id:date:subject:cc:to:from; bh=PMAXBRUIfItYGBsKmks9g2oQuLlZXFG0TmtqlhESjig=; b=ZN8c7TU99t/xeBpNT3umQiF/WPwjBicY+vfZqj9ZGCTzcxR9Ri/P5SozMmkFYXYYNk qEpPupxl5sWanU3H8zVxSRz1rmMWFZNiRhdb5HY8R/N9ktNkyzTwQZs8EXVixEAPOU54 T18PTYT6qg+GmZsQ9HaR+oBfPQ+D2DG59hchtSIBZ6Ovx6RHwBS2maWWvs3kz9AW7Jt2 XJZASPhfnyjSe8NCZH0aQSFrgaI/iqw3xYAOyAdXSIZ9vrZUisozE3p9nOdvDWMUYo4R nX07aUj3DdI2VoarZ331OZTba0jOb4Pqu1JLy8KDFt49kcCYMrlrfUa+ybMYXt0P54db bS1A== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si12097907edb.495.2020.04.16.14.14.44; Thu, 16 Apr 2020 14:15:08 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728630AbgDPVNo (ORCPT + 99 others); Thu, 16 Apr 2020 17:13:44 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:44144 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725928AbgDPVNo (ORCPT ); Thu, 16 Apr 2020 17:13:44 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: krisman) with ESMTPSA id E8F742A23DF From: Gabriel Krisman Bertazi To: agk@redhat.com, snitzer@redhat.com Cc: dm-devel@redhat.com, linux-kernel@vger.kernel.org, song@kernel.org, khazhy@google.com, Gabriel Krisman Bertazi , kernel@collabora.com Subject: [PATCH 0/2] Historical Service Time Path Selector Date: Thu, 16 Apr 2020 17:13:34 -0400 Message-Id: <20200416211336.2423618-1-krisman@collabora.com> X-Mailer: git-send-email 2.26.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, This small series implements a new path selector that leverages historical path IO time in order to estimate future path performance. Implementation details can be found on Patch 2. This selector yields better path distribution, considering the mean deviation from the calculated optimal utilization, for small IO depths when compared to the Service Time selector with fio benchmarks. For instance, on a multipath setup with 4 paths, where one path is 4 times slower than the rest, issuing 500MB of randwrites, we have the following path utilization rates: | depth=1 | depth=64 | | | ST | HST | ST | HST | Best | |-----+-------+-------+-------+-------+-------| | sda | 0.250 | 0.294 | 0.297 | 0.294 | 0.307 | | sdb | 0.250 | 0.297 | 0.296 | 0.297 | 0.307 | | sdc | 0.250 | 0.296 | 0.298 | 0.296 | 0.307 | | sdd | 0.250 | 0.112 | 0.106 | 0.112 | 0.076 | For small depths, HST is much quicker in detecting slow paths and has a better selection than ST. As the iodepth increases, ST gets close to HST, which still behaves steadily. The raw performance data for different depths types of IO can be found at: This was tested primarily on a Google cloud SAN with real data and usage patterns and with artificial benchmarks using fio. Khazhismel Kumykov (2): md: Expose struct request to path selector md: Add Historical Service Time Path Selector drivers/md/Kconfig | 11 + drivers/md/Makefile | 1 + drivers/md/dm-historical-service-time.c | 561 ++++++++++++++++++++++++ drivers/md/dm-mpath.c | 12 +- drivers/md/dm-path-selector.h | 6 + 5 files changed, 589 insertions(+), 2 deletions(-) create mode 100644 drivers/md/dm-historical-service-time.c -- 2.26.0