[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lustre-devel
Subject:    Re: [lustre-devel] [PATCH 2/6] Added fields to message for RLQOS support
From:       Alexey Lyashkov <alexey.lyashkov () seagate ! com>
Date:       2017-03-23 14:54:07
Message-ID: CAJ2e-W0o1Y5XL63Gjs8v25OV1YdYAs=PEpx92DmgHsS6-TRq9w () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


You should don't comment a asserts, but introduce an additional connect
flag to handle used fields if this flag set.

As i see you have write an code to work between patched nodes, but we have
no guaratee all nodes in clusters uses same version all time.

On Tue, Mar 21, 2017 at 10:43 PM, Yan Li <yanli@ascar.io> wrote:

> Modified the request message to embed sent_time, which will be
> returned from the server and used to calculate the exponentially
> weighted moving average of sent_time gap in return messages. It is
> used as a metric for rate-limiting quality of service.
>
> Signed-off-by: Yan Li <yanli@ascar.io>
> ---
>  lustre/include/lustre/lustre_idl.h | 4 ++++
>  lustre/ptlrpc/pack_generic.c       | 5 +++++
>  lustre/ptlrpc/wiretest.c           | 2 ++
>  lustre/utils/wiretest.c            | 2 ++
>  4 files changed, 13 insertions(+)
>
> diff --git a/lustre/include/lustre/lustre_idl.h b/lustre/include/lustre/
> lustre_idl.h
> index bf23a47..7a200d1 100644
> --- a/lustre/include/lustre/lustre_idl.h
> +++ b/lustre/include/lustre/lustre_idl.h
> @@ -3336,8 +3336,12 @@ struct obdo {
>                                                  * each stripe.
>                                                  * brw: grant space
> consumed on
>                                                  * the client for the
> write */
> +#ifdef ENABLE_RLQOS
> +       struct timeval          o_sent_time;    /* timeval is 64x2 bits on
> Linux */
> +#else
>         __u64                   o_padding_4;
>         __u64                   o_padding_5;
> +#endif
>         __u64                   o_padding_6;
>  };
>
> diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c
> index 8df8ea8..d0bc87a 100644
> --- a/lustre/ptlrpc/pack_generic.c
> +++ b/lustre/ptlrpc/pack_generic.c
> @@ -1722,8 +1722,13 @@ void lustre_swab_obdo (struct obdo  *o)
>          __swab32s (&o->o_uid_h);
>          __swab32s (&o->o_gid_h);
>          __swab64s (&o->o_data_version);
> +#ifdef ENABLE_RLQOS
> +        __swab64s ((__u64*)&o->o_sent_time.tv_sec);
> +        __swab64s ((__u64*)&o->o_sent_time.tv_usec);
> +#else
>          CLASSERT(offsetof(typeof(*o), o_padding_4) != 0);
>          CLASSERT(offsetof(typeof(*o), o_padding_5) != 0);
> +#endif
>          CLASSERT(offsetof(typeof(*o), o_padding_6) != 0);
>
>  }
> diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c
> index 070ef91..0c909a6 100644
> --- a/lustre/ptlrpc/wiretest.c
> +++ b/lustre/ptlrpc/wiretest.c
> @@ -1314,6 +1314,7 @@ void lustre_assert_wire_constants(void)
>                  (long long)(int)offsetof(struct obdo, o_data_version));
>         LASSERTF((int)sizeof(((struct obdo *)0)->o_data_version) == 8,
> "found %lld\n",
>                  (long long)(int)sizeof(((struct obdo
> *)0)->o_data_version));
> +#ifndef ENABLE_RLQOS
>         LASSERTF((int)offsetof(struct obdo, o_padding_4) == 184, "found
> %lld\n",
>                  (long long)(int)offsetof(struct obdo, o_padding_4));
>         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_4) == 8, "found
> %lld\n",
> @@ -1322,6 +1323,7 @@ void lustre_assert_wire_constants(void)
>                  (long long)(int)offsetof(struct obdo, o_padding_5));
>         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_5) == 8, "found
> %lld\n",
>                  (long long)(int)sizeof(((struct obdo *)0)->o_padding_5));
> +#endif
>         LASSERTF((int)offsetof(struct obdo, o_padding_6) == 200, "found
> %lld\n",
>                  (long long)(int)offsetof(struct obdo, o_padding_6));
>         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_6) == 8, "found
> %lld\n",
> diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c
> index 233d7d8..47fbbf0 100644
> --- a/lustre/utils/wiretest.c
> +++ b/lustre/utils/wiretest.c
> @@ -1329,6 +1329,7 @@ void lustre_assert_wire_constants(void)
>                  (long long)(int)offsetof(struct obdo, o_data_version));
>         LASSERTF((int)sizeof(((struct obdo *)0)->o_data_version) == 8,
> "found %lld\n",
>                  (long long)(int)sizeof(((struct obdo
> *)0)->o_data_version));
> +#ifndef ENABLE_RLQOS
>         LASSERTF((int)offsetof(struct obdo, o_padding_4) == 184, "found
> %lld\n",
>                  (long long)(int)offsetof(struct obdo, o_padding_4));
>         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_4) == 8, "found
> %lld\n",
> @@ -1337,6 +1338,7 @@ void lustre_assert_wire_constants(void)
>                  (long long)(int)offsetof(struct obdo, o_padding_5));
>         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_5) == 8, "found
> %lld\n",
>                  (long long)(int)sizeof(((struct obdo *)0)->o_padding_5));
> +#endif
>         LASSERTF((int)offsetof(struct obdo, o_padding_6) == 200, "found
> %lld\n",
>                  (long long)(int)offsetof(struct obdo, o_padding_6));
>         LASSERTF((int)sizeof(((struct obdo *)0)->o_padding_6) == 8, "found
> %lld\n",
> --
> 1.8.3.1
>
> _______________________________________________
> lustre-devel mailing list
> lustre-devel@lists.lustre.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.
> lustre.org_listinfo.cgi_lustre-2Ddevel-2Dlustre.org&d=DwICAg&c=IGDlg0lD0b-
> nebmJJ0Kp8A&r=m8P9AM2wTf4l79yg9e1LHD5IHagtwa3P4AXaemlM6Lg&m=
> NuClc8LkPaQ91Zav0h5yoiRmBVC4_Ks9Db6KX3xsRmk&s=
> 6FVNfemWTMvnOwmVBxixoJyS4CNIP_D14UGw2pWlGd0&e=
>



-- 
Alexey Lyashkov * ·* Technical lead for a Morpheus team
Seagate Technology, LLC
www.seagate.com
www.lustre.org

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_default" style="font-size:small">You should \
don&#39;t comment a asserts, but introduce an additional connect flag to handle used \
fields if this flag set.</div><div class="gmail_default" \
style="font-size:small"><br></div><div class="gmail_default" \
style="font-size:small">As i see you have write an code to work between patched \
nodes, but we have no guaratee all nodes in clusters uses same version all \
time.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Mar \
21, 2017 at 10:43 PM, Yan Li <span dir="ltr">&lt;<a href="mailto:yanli@ascar.io" \
target="_blank">yanli@ascar.io</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Modified the request message to embed sent_time, which will \
be<br> returned from the server and used to calculate the exponentially<br>
weighted moving average of sent_time gap in return messages. It is<br>
used as a metric for rate-limiting quality of service.<br>
<br>
Signed-off-by: Yan Li &lt;<a href="mailto:yanli@ascar.io">yanli@ascar.io</a>&gt;<br>
---<br>
  lustre/include/lustre/lustre_<wbr>idl.h | 4 ++++<br>
  lustre/ptlrpc/pack_generic.c           | 5 +++++<br>
  lustre/ptlrpc/wiretest.c                 | 2 ++<br>
  lustre/utils/wiretest.c                  | 2 ++<br>
  4 files changed, 13 insertions(+)<br>
<br>
diff --git a/lustre/include/lustre/<wbr>lustre_idl.h \
b/lustre/include/lustre/<wbr>lustre_idl.h<br> index bf23a47..7a200d1 100644<br>
--- a/lustre/include/lustre/<wbr>lustre_idl.h<br>
+++ b/lustre/include/lustre/<wbr>lustre_idl.h<br>
@@ -3336,8 +3336,12 @@ struct obdo {<br>
                                                                          * each \
                stripe.<br>
                                                                          * brw: \
                grant space consumed on<br>
                                                                          * the \
client for the write */<br> +#ifdef ENABLE_RLQOS<br>
+           struct timeval               o_sent_time;      /* timeval is 64x2 bits on \
Linux */<br> +#else<br>
            __u64                             o_padding_4;<br>
            __u64                             o_padding_5;<br>
+#endif<br>
            __u64                             o_padding_6;<br>
  };<br>
<br>
diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c<br>
index 8df8ea8..d0bc87a 100644<br>
--- a/lustre/ptlrpc/pack_generic.c<br>
+++ b/lustre/ptlrpc/pack_generic.c<br>
@@ -1722,8 +1722,13 @@ void lustre_swab_obdo (struct obdo   *o)<br>
              __swab32s (&amp;o-&gt;o_uid_h);<br>
              __swab32s (&amp;o-&gt;o_gid_h);<br>
              __swab64s (&amp;o-&gt;o_data_version);<br>
+#ifdef ENABLE_RLQOS<br>
+            __swab64s ((__u64*)&amp;o-&gt;o_sent_time.tv_<wbr>sec);<br>
+            __swab64s ((__u64*)&amp;o-&gt;o_sent_time.tv_<wbr>usec);<br>
+#else<br>
              CLASSERT(offsetof(typeof(*o), o_padding_4) != 0);<br>
              CLASSERT(offsetof(typeof(*o), o_padding_5) != 0);<br>
+#endif<br>
              CLASSERT(offsetof(typeof(*o), o_padding_6) != 0);<br>
<br>
  }<br>
diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c<br>
index 070ef91..0c909a6 100644<br>
--- a/lustre/ptlrpc/wiretest.c<br>
+++ b/lustre/ptlrpc/wiretest.c<br>
@@ -1314,6 +1314,7 @@ void lustre_assert_wire_constants(<wbr>void)<br>
                          (long long)(int)offsetof(struct obdo, o_data_version));<br>
            LASSERTF((int)sizeof(((struct obdo *)0)-&gt;o_data_version) == 8, \
                &quot;found %lld\n&quot;,<br>
                          (long long)(int)sizeof(((struct obdo \
*)0)-&gt;o_data_version));<br> +#ifndef ENABLE_RLQOS<br>
            LASSERTF((int)offsetof(struct obdo, o_padding_4) == 184, &quot;found \
                %lld\n&quot;,<br>
                          (long long)(int)offsetof(struct obdo, o_padding_4));<br>
            LASSERTF((int)sizeof(((struct obdo *)0)-&gt;o_padding_4) == 8, \
&quot;found %lld\n&quot;,<br> @@ -1322,6 +1323,7 @@ void \
                lustre_assert_wire_constants(<wbr>void)<br>
                          (long long)(int)offsetof(struct obdo, o_padding_5));<br>
            LASSERTF((int)sizeof(((struct obdo *)0)-&gt;o_padding_5) == 8, \
                &quot;found %lld\n&quot;,<br>
                          (long long)(int)sizeof(((struct obdo \
*)0)-&gt;o_padding_5));<br> +#endif<br>
            LASSERTF((int)offsetof(struct obdo, o_padding_6) == 200, &quot;found \
                %lld\n&quot;,<br>
                          (long long)(int)offsetof(struct obdo, o_padding_6));<br>
            LASSERTF((int)sizeof(((struct obdo *)0)-&gt;o_padding_6) == 8, \
                &quot;found %lld\n&quot;,<br>
diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c<br>
index 233d7d8..47fbbf0 100644<br>
--- a/lustre/utils/wiretest.c<br>
+++ b/lustre/utils/wiretest.c<br>
@@ -1329,6 +1329,7 @@ void lustre_assert_wire_constants(<wbr>void)<br>
                          (long long)(int)offsetof(struct obdo, o_data_version));<br>
            LASSERTF((int)sizeof(((struct obdo *)0)-&gt;o_data_version) == 8, \
                &quot;found %lld\n&quot;,<br>
                          (long long)(int)sizeof(((struct obdo \
*)0)-&gt;o_data_version));<br> +#ifndef ENABLE_RLQOS<br>
            LASSERTF((int)offsetof(struct obdo, o_padding_4) == 184, &quot;found \
                %lld\n&quot;,<br>
                          (long long)(int)offsetof(struct obdo, o_padding_4));<br>
            LASSERTF((int)sizeof(((struct obdo *)0)-&gt;o_padding_4) == 8, \
&quot;found %lld\n&quot;,<br> @@ -1337,6 +1338,7 @@ void \
                lustre_assert_wire_constants(<wbr>void)<br>
                          (long long)(int)offsetof(struct obdo, o_padding_5));<br>
            LASSERTF((int)sizeof(((struct obdo *)0)-&gt;o_padding_5) == 8, \
                &quot;found %lld\n&quot;,<br>
                          (long long)(int)sizeof(((struct obdo \
*)0)-&gt;o_padding_5));<br> +#endif<br>
            LASSERTF((int)offsetof(struct obdo, o_padding_6) == 200, &quot;found \
                %lld\n&quot;,<br>
                          (long long)(int)offsetof(struct obdo, o_padding_6));<br>
            LASSERTF((int)sizeof(((struct obdo *)0)-&gt;o_padding_6) == 8, \
&quot;found %lld\n&quot;,<br> <span class="HOEnZb"><font color="#888888">--<br>
1.8.3.1<br>
<br>
______________________________<wbr>_________________<br>
lustre-devel mailing list<br>
<a href="mailto:lustre-devel@lists.lustre.org">lustre-devel@lists.lustre.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.lustre.org_listinfo \
.cgi_lustre-2Ddevel-2Dlustre.org&amp;d=DwICAg&amp;c=IGDlg0lD0b-nebmJJ0Kp8A&amp;r=m8P9A \
M2wTf4l79yg9e1LHD5IHagtwa3P4AXaemlM6Lg&amp;m=NuClc8LkPaQ91Zav0h5yoiRmBVC4_Ks9Db6KX3xsRmk&amp;s=6FVNfemWTMvnOwmVBxixoJyS4CNIP_D14UGw2pWlGd0&amp;e=" \
rel="noreferrer" target="_blank">https://urldefense.proofpoint.<wbr>com/v2/url?u=http- \
3A__lists.<wbr>lustre.org_listinfo.cgi_<wbr>lustre-2Ddevel-2Dlustre.org&amp;d=<wbr>DwI \
CAg&amp;c=IGDlg0lD0b-<wbr>nebmJJ0Kp8A&amp;r=<wbr>m8P9AM2wTf4l79yg9e1LHD5IHagtwa<wbr>3P \
4AXaemlM6Lg&amp;m=<wbr>NuClc8LkPaQ91Zav0h5yoiRmBVC4_<wbr>Ks9Db6KX3xsRmk&amp;s=<wbr>6FVNfemWTMvnOwmVBxixoJyS4CNIP_<wbr>D14UGw2pWlGd0&amp;e=</a><br>
 </font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr">Alexey \
Lyashkov  <strong> ·</strong>  Technical lead for a Morpheus team<br> Seagate \
Technology, LLC<br> <a href="http://www.seagate.com" \
target="_blank">www.seagate.com</a><br><div><a href="http://www.lustre.org" \
target="_blank">www.lustre.org</a></div></div></div> </div>



_______________________________________________
lustre-devel mailing list
lustre-devel@lists.lustre.org
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic