Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp1208251rwi; Fri, 14 Oct 2022 14:48:23 -0700 (PDT) X-Google-Smtp-Source: AMsMyM475KBOLePupZEQJPAo4o1yk0vSFolnCFAYwHnHgdpmTxBZaRS1lNU74TByavSDpxfzXtAe X-Received: by 2002:a05:6402:2552:b0:45d:ecf:b23 with SMTP id l18-20020a056402255200b0045d0ecf0b23mr5686282edb.255.1665784103677; Fri, 14 Oct 2022 14:48:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665784103; cv=none; d=google.com; s=arc-20160816; b=w39uhwN6DnbjZQp0jA5+UjRAa2srLq/tGsh9K19bUOAwFy/tnRFbt+VjbRY1EgbTPh hAUCC5Jgq0LTRpQRTfeXEusYk99JPXLRl+ds8yxTJAG47wbMGgTtUwMaggPbuePzE3sN nweJlXEiACsUuMEAawsrq2xrHGwFBl/6iMZyrXFgA4OdYMaZTeKqWm6OX8xWwPuUYZ1M fFFror9nolYBSGt+sxSU+gOSLj1T4A80TJr47P/GXK6r+mViDICca9Xa6IbWWecez0I/ rquCK0tKE5/JZHwZDKxuz67O3nlsZ3SpnljsSFxCGS+qbUOtL+EXWf+LLg2Z2SBpnBvv yqKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:subject:cc:to:from:date :message-id:content-transfer-encoding:mime-version; bh=IMv697kD46Qkal93hkx1kxCdDNMH6SUr/Jff5uL9+I0=; b=0zsm9eKGQhtubb+a7ikrB6GPFn1BNSjPoRJy23TZRESXWiZ3yCsaxGYQDqfEnmDut1 ztFvgV7Of8JTpaFJ1Fwi1D84ISfqPMbaeDCHZlkbu9MQfMdpugmuhhxmJX47xXVj/UQY XPDxLWmFev6KxLqUt4J60cVObYbJh4KBOx2C84HABo18AAI7jJjeb4NszOovfcMk31fy HJxqjzN8ygYgXm5BqKYJ5IDDvYj7sa8lnvoiMDNU0qknwNZhbmNhiI6LUrbjP8KZ6mH4 FXcV1kXRuZ06hgTkN21Fk+owiFs4k9q/KqBaSQfrKSSO5P4asxNkGDUY1TLdvuzBFgP5 xITw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a21-20020a1709066d5500b00782933fe436si2814227ejt.965.2022.10.14.14.47.58; Fri, 14 Oct 2022 14:48:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229825AbiJNVTS (ORCPT + 99 others); Fri, 14 Oct 2022 17:19:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229826AbiJNVTR (ORCPT ); Fri, 14 Oct 2022 17:19:17 -0400 X-Greylist: delayed 518 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 14 Oct 2022 14:19:10 PDT Received: from mail.stoffel.org (mail.stoffel.org [172.104.24.175]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 647D71D29AC; Fri, 14 Oct 2022 14:19:09 -0700 (PDT) Received: from quad.stoffel.org (068-116-170-226.res.spectrum.com [68.116.170.226]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by mail.stoffel.org (Postfix) with ESMTPSA id 1A24F1E668; Fri, 14 Oct 2022 17:10:31 -0400 (EDT) Received: by quad.stoffel.org (Postfix, from userid 1000) id B8C27A7F96; Fri, 14 Oct 2022 17:10:30 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <25417.53318.731340.683540@quad.stoffel.home> Date: Fri, 14 Oct 2022 17:10:30 -0400 From: "John Stoffel" To: Jonathan Derrick Cc: Song Liu , , , jonathan.derrick@solidigm.com, jonathanx.sk.derrick@intel.com, Mariusz Tkaczyk Subject: Re: [PATCH v2 0/3] Bitmap percentage flushing In-Reply-To: <20221013224151.300-1-jonathan.derrick@linux.dev> References: <20221013224151.300-1-jonathan.derrick@linux.dev> X-Mailer: VM 8.2.0b under 27.1 (x86_64-pc-linux-gnu) X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00,NICE_REPLY_A, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >>>>> "Jonathan" == Jonathan Derrick writes: > This introduces a percentage-flushing mechanism that works in-tandem to the > mdadm delay timer. The percentage argument is based on the number of chunks > dirty (rather than percentage), due to large drives requiring smaller and > smaller percentages (eg, 32TB drives-> 1% is 320GB). I've been reading and re-reading this and I still don't understand what you're saying here. You say you're adding a percentage based mechanism, but then you say it's based on chunk counts, not percentages. I think you need to clean this up and re-word it. Maybe you're trying to say that you only take a percentage of the available write bandwidth per second or something like that? > This set hopes to provide a way to make the bitmap flushing more consistent. It > was observed that a synchronous, random write qd1 workload, could make bitmap > writes easily become almost half of the I/O. And in similar workloads with > different timing, it was several minutes between bitmap updates. This is too > inconsistent to be reliable. > This first and second patches adds the flush_threshold parameter. The default > value of 0 defines the default behavior: unplugging immediately just as before. > With a flush-threshold value of 1, it becomes more consistent and paranoid, > flushing on nearly every I/O, leading to a 40% or greater situation. From What situation? Please be more clear here. > there, the flush_threshold can be defined higher for those situations where > power loss is rare and full resync can be tolerated. > The third patch converts the daemon worker to an actual timer. This makes it > more consistent and removes some ugly code. > Jonathan Derrick (3): > md/bitmap: Add chunk-threshold unplugging > md/bitmap: Add sysfs interface for flush threshold > md/bitmap: Convert daemon_work to proper timer > Documentation/admin-guide/md.rst | 5 ++ > drivers/md/md-bitmap.c | 98 +++++++++++++++++++++++++------- > drivers/md/md-bitmap.h | 4 +- > drivers/md/md.c | 9 ++- > drivers/md/md.h | 2 + > 5 files changed, 93 insertions(+), 25 deletions(-) > -- > 2.31.1