From patchwork Tue Dec 4 17:59:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 10712315 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 041F413BF for ; Tue, 4 Dec 2018 17:59:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAE7A2C02D for ; Tue, 4 Dec 2018 17:59:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DDD7C2C0C8; Tue, 4 Dec 2018 17:59:11 +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 85B952C02D for ; Tue, 4 Dec 2018 17:59:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726069AbeLDR7K (ORCPT ); Tue, 4 Dec 2018 12:59:10 -0500 Received: from mail-yb1-f175.google.com ([209.85.219.175]:38926 "EHLO mail-yb1-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726038AbeLDR7K (ORCPT ); Tue, 4 Dec 2018 12:59:10 -0500 Received: by mail-yb1-f175.google.com with SMTP id w17-v6so7217421ybl.6 for ; Tue, 04 Dec 2018 09:59:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id; bh=GmszWqYPL+AmUPgI7T9NwuxYNlScNnG8gZ5JtkXpEes=; b=CXvOeROwSvle1E8/KdZ9S+xPxk2AjH2NRQrh9FteTMqLWmLuWQOIVtq7n50fXkRs/J q3+LhBIyoBIpQguZbx88c1fZ+NbtASKcFTKqg3Cv7Vu50UKy2fKpJJ46HRCx52bi6pGL s6oR7Pny0I80kXeq5OTdolIy0tC1tAnkNHExByiV22czSAF5IDZUrDDDOZGMsjM3nR5P Zv2HjYEFVMnZq9FzQxhOJmy3QbcTEMO05wyfs0x/fZf5MWAPCPAgoCT2pHIUgen9O4Zc 7PpWyUQlnRVR5R1sV5jTC/EUtaFVs+nNFpzTmxU+VCleV1OFP39h3me5m0TxNm6K9S6m /4Wg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=GmszWqYPL+AmUPgI7T9NwuxYNlScNnG8gZ5JtkXpEes=; b=CYOGDtbtFcKTrI8mX93UPuw2AMYcKir2Q+Brf1sIFgHRMtS4otGH6+ndyP401j661E ZYSl3AsX4YKVc3R/6dvJl3OrzAlB/ylzIDOtUdCa6U4XcRjrhMOF0rc+VRU7HdP2gjNt 88Pi9Gu/xZuFyTWQ7/7gSE7as/MEYi19onJZYQQeXbSicgeu7lYh/vxK0jA4LPTSoWnw K86x1dBLknC34s8w6VL6g9+3gaVKtSaqjIVPpZsUFRjywiKJjM5TCSWQgszLl2oF8kBz vXD7DykH1qyH3u8ph1j2Wn9PbMI6S94jV3/yKFTFUL0avpZ9wwODBRh6GD80gD+++hjD zOEQ== X-Gm-Message-State: AA+aEWYtHqIT1wiyica3E0L74zpOcwLn5mfCfq0aAbX+wjUWllCtNokK AdoVyhQWX1YRcSB5aK6VMMn9ug== X-Google-Smtp-Source: AFSGD/XIjgV0iHclOxAiyWgzxtnOvk34W2FLtlHv9M6x4wWNsK1+yun/YhK/CAuj4XmYMdM2Y21/JA== X-Received: by 2002:a25:aaa1:: with SMTP id t30-v6mr21204231ybi.175.1543946349639; Tue, 04 Dec 2018 09:59:09 -0800 (PST) Received: from localhost ([107.15.81.208]) by smtp.gmail.com with ESMTPSA id x203sm6225276ywd.41.2018.12.04.09.59.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 04 Dec 2018 09:59:08 -0800 (PST) From: Josef Bacik To: kernel-team@fb.com, linux-block@vger.kernel.org, axboe@kernel.dk Subject: [PATCH 0/3] Unify the throttling code for wbt and io-latency Date: Tue, 4 Dec 2018 12:59:01 -0500 Message-Id: <20181204175904.8486-1-josef@toxicpanda.com> X-Mailer: git-send-email 2.14.3 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 Originally when I wrote io-latency and the rq_qos code to provide a common base between wbt and io-latency I left out the throttling part. These were basically the same, but slightly different in both cases. The difference was enough and the code wasn't too complicated that I just copied it into io-latency and modified it for what I needed and carried on. Since then Jens has fixed a few issues with wakeups with the niave approach. Before you could easily cycle waiters back to the end of the line if they were woken up without the ability to actually do their IO yet. But because this was only in wbt we didn't get it in io-latency. Resolve this by creating a unified interface for doing the throttling, and then just handle the differences between the two users with user specific callbacks. This allows us to have one place where we have to mess with wakeups, and gives each user the ability to be their own special snowflake. Jens, I based this on for-next from 12/03, let me know if you want a different base. I tested this with my blktests test. Thanks, Josef