From: Sagi Grimberg <email@example.com> To: Ming Lei <firstname.lastname@example.org> Cc: Christoph Hellwig <email@example.com>, Baolin Wang <firstname.lastname@example.org>, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com, firstname.lastname@example.org, email@example.com Subject: Re: [RFC PATCH v2 1/7] block: Extand commit_rqs() to do batch processing Date: Fri, 8 May 2020 15:19:45 -0700 Message-ID: <firstname.lastname@example.org> (raw) In-Reply-To: <20200508214639.GA1389136@T590> Hey Ming, >> Would it make sense to elevate this flag to a request_queue flag >> (QUEUE_FLAG_ALWAYS_COMMIT)? > > request queue flag usually is writable, however this case just needs > one read-only flag, so I think it may be better to make it as > tagset/hctx flag. I actually intended it to be writable. >> I'm thinking of a possibility that an I/O scheduler may be used >> to activate this functionality rather than having the driver set >> it necessarily... > > Could you explain a bit why I/O scheduler should activate this > functionality? Sure, I've recently seen some academic work showing the benefits of batching in tcp/ip based block drivers. The problem with the approaches taken is that I/O scheduling is exercised deep down in the driver, which is not the direction I'd like to go if we are want to adopt some of the batching concepts. I spent some (limited) time thinking about this, and it seems to me that there is an opportunity to implement this as a dedicated I/O scheduler, and tie it to driver specific LLD stack optimizations (net-stack for example) relying on the commit_rq/bd->last hints. When scanning the scheduler code, I noticed exactly the phenomenon that this patchset is attempting to solve and Christoph referred me to it. Now I'm thinking if we can extend this batching optimization for both use-cases. > batching submission may be good for some drivers, and currently > we only do it in limited way. One reason is that there is extra > cost for full batching submission, such as this patch requires > one extra .commit_rqs() for each dispatch, and lock is often needed > in this callback. That is not necessarily the case at all. > IMO it can be a win for some slow driver or device, but may cause > a little performance drop for fast driver/device especially in workload > of not-batching submission. You're mostly correct. This is exactly why an I/O scheduler may be applicable here IMO. Mostly because I/O schedulers tend to optimize for something specific and always present tradeoffs. Users need to understand what they are optimizing for. Hence I'd say this functionality can definitely be available to an I/O scheduler should one exist.
next prev parent reply index Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-26 9:38 [RFC PATCH v2 0/7] Add MMC packed request support Baolin Wang 2020-04-26 9:38 ` [RFC PATCH v2 1/7] block: Extand commit_rqs() to do batch processing Baolin Wang 2020-04-27 15:46 ` Christoph Hellwig 2020-04-28 8:02 ` Baolin Wang 2020-05-08 21:35 ` Sagi Grimberg 2020-05-08 21:46 ` Ming Lei 2020-05-08 22:19 ` Sagi Grimberg [this message] 2020-05-08 23:22 ` Ming Lei 2020-05-09 8:57 ` Baolin Wang 2020-05-09 9:43 ` Ming Lei 2020-05-10 7:44 ` Sagi Grimberg 2020-05-11 1:29 ` Ming Lei 2020-05-11 9:23 ` Sagi Grimberg 2020-05-11 11:47 ` Ming Lei 2020-05-12 6:26 ` Sagi Grimberg 2020-05-12 7:55 ` Ming Lei 2020-04-26 9:38 ` [RFC PATCH v2 2/7] mmc: Add MMC packed request support for MMC software queue Baolin Wang 2020-04-26 9:38 ` [RFC PATCH v2 3/7] mmc: host: sdhci: Introduce ADMA3 transfer mode Baolin Wang 2020-04-26 9:38 ` [RFC PATCH v2 4/7] mmc: host: sdhci: Factor out the command configuration Baolin Wang 2020-04-26 9:38 ` [RFC PATCH v2 5/7] mmc: host: sdhci: Remove redundant sg_count member of struct sdhci_host Baolin Wang 2020-04-26 9:38 ` [RFC PATCH v2 6/7] mmc: host: sdhci: Add MMC packed request support Baolin Wang 2020-04-26 9:39 ` [RFC PATCH v2 7/7] mmc: host: sdhci-sprd: " Baolin Wang
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Linux-Block Archive on lore.kernel.org Archives are clonable: git clone --mirror https://lore.kernel.org/linux-block/0 linux-block/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 linux-block linux-block/ https://lore.kernel.org/linux-block \ email@example.com public-inbox-index linux-block Example config snippet for mirrors Newsgroup available over NNTP: nntp://nntp.lore.kernel.org/org.kernel.vger.linux-block AGPL code for this site: git clone https://public-inbox.org/public-inbox.git