From: Michele Sorcinelli <michelesr@autistici.org>
To: "Valdis Klētnieks" <valdis.kletnieks@vt.edu>
Cc: kernelnewbies@kernelnewbies.org
Subject: Re: block size vs bvec length
Date: Mon, 6 Apr 2020 00:53:54 +0100 [thread overview]
Message-ID: <f9a0a8a7-39e1-250a-7a4f-520d4bfedf10@autistici.org> (raw)
In-Reply-To: <395814.1586129725@turing-police>
On 4/6/20 12:35 AM, Valdis Klētnieks wrote:
> What is the actual device backing this block device?
There's no real device behind the driver: it's just writing the data on the
memory.
> That's called a read-modify-write (RMW) cycle, and is used when a write request
> isn't exactly one physical block long, and it happens for file devices as well,
> it's just hidden by the file system layer.
I understand this, but I don't understand why it's using 4096 as unit rather
than 512 that is the logical (and physical) block size I set for the queue
using blk_queue_logical_block_size(). What's the relation between actual block
size and the size of a segment (the bv_len field of the bio_vec struct) ?
Is it related somehow to the page size? Does a segment need to be at least long
as the page size? For example I've noticed that blk_queue_max_segment_size()
will set the max segment size to PAGE_SIZE if the given size it's < PAGE_SIZE.
_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
prev parent reply other threads:[~2020-04-05 23:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-05 18:17 block size vs bvec length Michele Sorcinelli
2020-04-05 23:35 ` Valdis Klētnieks
2020-04-05 23:53 ` Michele Sorcinelli [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=f9a0a8a7-39e1-250a-7a4f-520d4bfedf10@autistici.org \
--to=michelesr@autistici.org \
--cc=kernelnewbies@kernelnewbies.org \
--cc=valdis.kletnieks@vt.edu \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).