All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mikulas Patocka <mpatocka@redhat.com>
To: Tom Yan <tom.ty89@gmail.com>
Cc: Ondrej Kozina <okozina@redhat.com>,
	dm-devel@redhat.com, hch@lst.de,
	Mike Snitzer <msnitzer@redhat.com>, Milan Broz <mbroz@redhat.com>
Subject: Re: [PATCH] dm-crypt: limit the number of allocated pages
Date: Mon, 11 Sep 2017 19:57:56 -0400 (EDT)	[thread overview]
Message-ID: <alpine.LRH.2.02.1709111952270.31898@file01.intranet.prod.int.rdu2.redhat.com> (raw)
In-Reply-To: <CAGnHSEnDFc+XJDj9LtHjxJy+vSYS7HNK=F=nUH7tzsWPQozCeA@mail.gmail.com>



On Fri, 25 Aug 2017, Tom Yan wrote:

> On 20 August 2017 at 01:34, Mikulas Patocka <mpatocka@redhat.com> wrote:
> >
> > If you issue a single ioctl that takes extreme amount of time - the kernel
> > warns about being blocked for extreme amount of time - what else should it
> > do?
> >
> 
> But as I said, it does NOT warn about being blocked if the ioctl is
> issued for a SCSI device (i.e. blkdiscard -z /dev/sdX), so why the
> warning occurs / cannot be avoided in the case of a dm(-crypt)
> container?

The SCSI disk blocks in the make_request_fn routine, dm-crypt accepts the 
requests without blocking there. If you set high nr_requests value for the 
SCSI disk, it would not block and the same warning would occur.

> One thing I can see is, when blkdiscard -z is running on a dm-crypt
> container, iostat list it with a big avgqu-sz (not to be mixed up with
> avgrq-sz), starting from ~40000 (the underlying device is a 37G

There is large nubmer of requests in flight, so it reports large number of 
requests in flight. This isn't problem. The disk has 37G, average request 
size is 1024kB, 37G/1024k=37888.

Mikulas

> partition), gradually dropping to 0 (when the job is finished) with a
> step of ~40; all other items are 0 for the container (except %util,
> also 100% for most of the time). While for the underlying device, no
> matter if it is written to through a dm-crypt container, its lines
> stays at something like these:
> 
> Device:         rrqm/s   wrqm/s     r/s     w/s    rkB/s    wkB/s
> avgrq-sz avgqu-sz   await r_await w_await  svctm  %util
> sdb               0.00     0.00    0.00   85.00     0.00 43520.00
> 1024.00   144.71 1664.89    0.00 1664.89  11.76 100.00
> sdb               0.00     0.00    0.00   86.00     0.00 44032.00
> 1024.00   142.34 1694.70    0.00 1694.70  11.63 100.00
> 

      reply	other threads:[~2017-09-11 23:57 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-14  2:45 [PATCH] dm-crypt: limit the number of allocated pages Mikulas Patocka
2017-08-14 20:19 ` John Stoffel
2017-08-15  0:07   ` Mikulas Patocka
2017-08-17 18:50     ` John Stoffel
2017-08-18 16:58       ` Mikulas Patocka
2017-08-18 19:02         ` John Stoffel
2017-08-19  0:18           ` Mikulas Patocka
2017-08-19  0:59             ` Bart Van Assche
2017-08-21 14:06             ` John Stoffel
2017-08-14 20:22 ` Tom Yan
2017-08-15  0:20   ` Mikulas Patocka
2017-08-15 16:51     ` Tom Yan
2017-08-19 17:34       ` Mikulas Patocka
2017-08-25  4:58         ` Tom Yan
2017-09-11 23:57           ` Mikulas Patocka [this message]

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 \
    --in-reply-to=alpine.LRH.2.02.1709111952270.31898@file01.intranet.prod.int.rdu2.redhat.com \
    --to=mpatocka@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=hch@lst.de \
    --cc=mbroz@redhat.com \
    --cc=msnitzer@redhat.com \
    --cc=okozina@redhat.com \
    --cc=tom.ty89@gmail.com \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.