From patchwork Mon Jul 16 16:12:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10527165 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 957E8601D2 for ; Mon, 16 Jul 2018 16:12:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8D2B928CD6 for ; Mon, 16 Jul 2018 16:12:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 81A1728DD1; Mon, 16 Jul 2018 16:12:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FFB728CD6 for ; Mon, 16 Jul 2018 16:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728284AbeGPQkd (ORCPT ); Mon, 16 Jul 2018 12:40:33 -0400 Received: from mail-qk0-f180.google.com ([209.85.220.180]:42756 "EHLO mail-qk0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727466AbeGPQkd (ORCPT ); Mon, 16 Jul 2018 12:40:33 -0400 Received: by mail-qk0-f180.google.com with SMTP id 26-v6so10106434qks.9 for ; Mon, 16 Jul 2018 09:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AMBDmFHmjjsXUOUIsfP+HkmSgWWHn7Dn0WY0q6fEVnM=; b=ppPvSTsRWzfXj4Hdq0PzBtbTdRSOE/X9pM1+oVyZxZFcRn/hAt7PIExl7wTB82608r zC6ORZeMWov/Rvq1eWQNo/YrCmEULS+XbqocC3Y8t9rupXIuhc0ylNne7Xj53QZt1Og9 Wwt94X4sdFqD0j5jws8KSn1mylgqcD6j4rD5hsoLTX6q9ZtV/gkHbh1UT7jROuduZtom q9lA9zXUP3tnFQI4LSkB4mGI07qYjW+oVpc56kYGRMm1DQrmM8eUCW+hW7HbnW3lsnID Zq5ryrIp+srSW3n08v+UgIOOIjbBoe7SP4dG0eeLJoh/nV/ehN5W0DtPbuTzik4GhP2c aWpg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=AMBDmFHmjjsXUOUIsfP+HkmSgWWHn7Dn0WY0q6fEVnM=; b=TB4CFuQLErs0c6m7MKXcTt0WWQJbWRzCZv+ZV6S9FTGFgTFjYZ33zysGUtW+IJNuDZ UUDseos//8mtDLpielyyxqqAjo8epc658B3doG46irY5WI7TFNdK29zbB5eGzS+giNTJ r9TQFjVMb4P4y/TbQvcxGwY9Tdd7nRomyn2KtKVXQCsWTPpcQe5yeO6GI1O/vs897OJu QDYatuxOs0WGA8jvrW0RO8wzncPTBCtyXeYPRWZQ/2JUurgqdHHTDRuryKU/TcsFoXCt Ot84CdcyzfOROTXIYrhZ0Fbyk7zR8nqfShoZXq/5WcNww+ITQl5I3C1TbYRhJn929uUi Dq3A== X-Gm-Message-State: AOUpUlGe5Fm+wAPizEcHNAwn3umuVp5cx/D8uARHxu1y75bwzEtxIFKJ l2IuSH7IfP9sBvgWHAosQH5/+Q== X-Google-Smtp-Source: AAOMgpdQi0i+XYxjkAo12FlnDbXzS0lqn+yOGgpngAlpo+sUF1o9tpzH7bijejr6j05MunqFWoJTrQ== X-Received: by 2002:a37:4ed8:: with SMTP id c207-v6mr15147998qkb.164.1531757546720; Mon, 16 Jul 2018 09:12:26 -0700 (PDT) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id t11-v6sm19173277qtc.2.2018.07.16.09.12.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 16 Jul 2018 09:12:25 -0700 (PDT) From: Josef Bacik To: axboe@kernel.dk, linux-block@vger.kernel.org, kernel-team@fb.com Cc: Josef Bacik Subject: [PATCH 2/2] blk-iolatency: truncate our current time Date: Mon, 16 Jul 2018 12:12:23 -0400 Message-Id: <20180716161223.21486-2-josef@toxicpanda.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180716161223.21486-1-josef@toxicpanda.com> References: <20180716161223.21486-1-josef@toxicpanda.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Josef Bacik In our longer tests we noticed that some boxes would degrade to the point of uselessness. This is because we truncate the current time when saving it in our bio, but I was using the raw current time to subtract from. So once the box had been up a certain amount of time it would appear as if our IO's were taking several years to complete. Fix this by truncating the current time so it matches the issue time. Verified this worked by running with this patch for a week on our test tier. Signed-off-by: Josef Bacik --- block/blk-iolatency.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c index 893f888eebb1..bb59b2929e0d 100644 --- a/block/blk-iolatency.c +++ b/block/blk-iolatency.c @@ -425,6 +425,12 @@ static void iolatency_record_time(struct iolatency_grp *iolat, u64 start = bio_issue_time(issue); u64 req_time; + /* + * Have to do this so we are truncated to the correct time that our + * issue is truncated to. + */ + now = __bio_issue_time(now); + if (now <= start) return;