From: NeilBrown <neilb@suse.com>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] [PATCH 01/18] lustre: grant: add support for OBD_CONNECT_GRANT_PARAM
Date: Tue, 03 Jul 2018 13:04:48 +1000 [thread overview]
Message-ID: <87601x2f5b.fsf@notabene.neil.brown.name> (raw)
In-Reply-To: <1530573875-20465-2-git-send-email-jsimmons@infradead.org>
On Mon, Jul 02 2018, James Simmons wrote:
> From: Johann Lombardi <jlombardi@whamcloud.com>
>
> Add support for grant overhead calculation on the client side.
> To do so, clients track usage on a per-extent basis. An extent is
> composed of contiguous blocks.
> The OST now returns to the OSC layer several parameters to consume
> grant more accurately:
Just to be sure that I'm understanding correctly, should "consume"
above be "compute" ??
>
> - the backend filesystem block size which is the minimal grant
> allocation unit;
> - the maximum extent size;
> - the extent insertion cost.
> Clients now pack in bulk write how much grant space was consumed for
> the RPC. Dirty data accounting also adopts the same scheme.
>
> Moreover, each backend OSD now reports its own set of parameters:
> - For ldiskfs, we usually have a 4KB block size with a maximum extent
> size of 32MB (theoretical limit of 128MB) and an extent insertion
> cost of 6 x 4KB = 24KB
> - For ZFS, we report a block size of 128KB, an extent size of 128
> blocks (i.e. 16MB with 128KB block size) and a block insertion cost
> of 112KB.
>
> Besides, there is now no more generic metadata overhead reservation
> done inside each OSD. Instead grant space is inflated for clients
> that do not support the new grant parameters. That said, a tiny
> percentage (typically 0.76%) of the free space is still reserved
> inside each OSD to avoid fragmentation which might hurt performance
> and impact our grant calculation (e.g. extents are broken due to
> fragmentation).
>
> This patch also fixes several other issues:
>
> - Bulk write resent by ptlrpc after reconnection could trigger
> spurious error messages related to broken dirty accounting.
> The issue was that oa_dirty is discarded for resent requests
> (grant flag cleared in ost_brw_write()), so we can legitimately
> have grant > fed_dirty in ofd_grant_check().
> This was fixed by resetting fed_dirty on reconnection and skipping
> the dirty accounting check in ofd_grant_check() in the case of
> ptlrpc resend.
ofd_grant_check doesn't appear in this patch. Presumably it was part of
the server code that was stripped from the patch.
>
> - In obd_connect_data_seqprint(), the connection flags cannot fit
> in a 32-bit integer.
I cannot see what this might refer to either.
>
> - When merging two OSC extents, an extent tax should be released
> in both the merged extent and in the grant accounting.
I think I might see what this relates to.
> +static ssize_t cur_dirty_grant_bytes_show(struct kobject *kobj,
> + struct attribute *attr,
> + char *buf)
> +{
> + struct obd_device *dev = container_of(kobj, struct obd_device,
> + obd_kobj);
> + struct client_obd *cli = &dev->u.cli;
> + int len;
> +
> + spin_lock(&cli->cl_loi_list_lock);
> + len = sprintf(buf, "%lu\n", cli->cl_dirty_grant);
> + spin_unlock(&cli->cl_loi_list_lock);
Why take the spinlock?? cl_dirty_grant is 'long', so reading it is
atomic.
> + if (OCD_HAS_FLAG(&cli->cl_import->imp_connect_data,
> + GRANT_PARAM)) {
> + int nrextents;
> +
> + /*
> + * take extent tax into account when asking for more
> + * grant space
> + */
> + nrextents = (nrpages + cli->cl_max_extent_pages - 1) /
> + cli->cl_max_extent_pages;
I generally prefer DIV_ROUND_UP() for this.
I don't think any of the above will stop me from applying the patch,
though I might edit the description, and may add a fix-up patch afterwards.
Thanks.
NeilBrown
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20180703/348eec1f/attachment.sig>
next prev parent reply other threads:[~2018-07-03 3:04 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-02 23:24 [lustre-devel] [PATCH 00/18] lustre: missing updates from lustre 2.9 James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 01/18] lustre: grant: add support for OBD_CONNECT_GRANT_PARAM James Simmons
2018-07-03 3:04 ` NeilBrown [this message]
2018-07-03 12:43 ` Patrick Farrell
2018-07-03 21:59 ` NeilBrown
2018-07-06 4:02 ` Cory Spitz
2018-07-06 14:28 ` James Simmons
2018-07-06 14:29 ` James Simmons
2018-07-06 15:12 ` Andreas Dilger
2018-07-06 15:50 ` James Simmons
2018-07-23 0:36 ` NeilBrown
2018-07-02 23:24 ` [lustre-devel] [PATCH 02/18] lustre: ladvise: Add feature of giving file access advices James Simmons
2018-07-03 3:32 ` NeilBrown
2018-07-05 22:01 ` James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 03/18] lustre: fileset: add fileset mount support James Simmons
2018-07-03 3:52 ` NeilBrown
2018-07-02 23:24 ` [lustre-devel] [PATCH 04/18] lustre: obd: rename md_getstatus() to md_get_root() James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 05/18] lustre: llite: fast read implementation James Simmons
2018-07-03 4:10 ` NeilBrown
2018-07-03 12:46 ` Patrick Farrell
2018-07-03 22:03 ` NeilBrown
2018-07-02 23:24 ` [lustre-devel] [PATCH 06/18] lustre: obd: reserve connection flag OBD_CONNECT2_FILE_SECCTX James Simmons
2018-07-03 4:20 ` NeilBrown
2018-07-02 23:24 ` [lustre-devel] [PATCH 07/18] lustre: llite: restore fd_och when putting lease James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 08/18] lustre: security: send file security context for creates James Simmons
2018-07-03 4:26 ` NeilBrown
2018-07-02 23:24 ` [lustre-devel] [PATCH 09/18] lustre: llite: ladvise protocol changes James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 10/18] lustre: ladvise: Add willread advice support for ladvise James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 11/18] lustre: osc: max_pages_per_rpc should be chunk size aligned James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 12/18] lustre: ladvise: Add dontneed advice support for ladvise James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 13/18] lustre: ptlrpc: properly set "rq_xid" for 4MB IO James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 14/18] lustre: obd: add callback for llog_cat_process_or_fork James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 15/18] lustre: mount: fix lmd_parse() to handle new delimiters James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 16/18] lustre: libcfs: restore original behavior in cfs_str2num_check James Simmons
2018-07-03 4:45 ` NeilBrown
2018-07-05 22:50 ` James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 17/18] lustre: ldlm: reduce mem footprint of ldlm_resource James Simmons
2018-07-02 23:24 ` [lustre-devel] [PATCH 18/18] lustre: update version to 2.8.99 James Simmons
2018-07-03 21:46 ` Andreas Dilger
2018-07-05 22:53 ` James Simmons
2018-07-03 4:57 ` [lustre-devel] [PATCH 00/18] lustre: missing updates from lustre 2.9 NeilBrown
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=87601x2f5b.fsf@notabene.neil.brown.name \
--to=neilb@suse.com \
--cc=lustre-devel@lists.lustre.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
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.