lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 9 May 2020 05:46:39 +0800
From:   Ming Lei <ming.lei@...hat.com>
To:     Sagi Grimberg <sagi@...mberg.me>
Cc:     Christoph Hellwig <hch@...radead.org>,
        Baolin Wang <baolin.wang7@...il.com>, axboe@...nel.dk,
        ulf.hansson@...aro.org, adrian.hunter@...el.com, arnd@...db.de,
        linus.walleij@...aro.org, paolo.valente@...aro.org,
        orsonzhai@...il.com, zhang.lyra@...il.com,
        linux-mmc@...r.kernel.org, linux-block@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH v2 1/7] block: Extand commit_rqs() to do batch
 processing

On Fri, May 08, 2020 at 02:35:35PM -0700, Sagi Grimberg wrote:
> 
> > > diff --git a/include/linux/blk-mq.h b/include/linux/blk-mq.h
> > > index f389d7c724bd..6a20f8e8eb85 100644
> > > --- a/include/linux/blk-mq.h
> > > +++ b/include/linux/blk-mq.h
> > > @@ -391,6 +391,7 @@ struct blk_mq_ops {
> > >   enum {
> > >   	BLK_MQ_F_SHOULD_MERGE	= 1 << 0,
> > >   	BLK_MQ_F_TAG_SHARED	= 1 << 1,
> > > +	BLK_MQ_F_FORCE_COMMIT_RQS = 1 << 3,
> > 
> > Maybe BLK_MQ_F_ALWAYS_COMMIT might be a better name?  Also this
> > flag (just like the existing ones..) could really use a comment
> > explaining it.
> 
> 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'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?

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.

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.


Thanks, 
Ming

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ