<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 03:28:08 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-16566] rq_sepol makes ptlrpc_request exceed 1024 bytes</title>
                <link>https://jira.whamcloud.com/browse/LU-16566</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;The &lt;tt&gt;rq_sepol&lt;/tt&gt; field in &lt;tt&gt;struct ptlrpc_request&lt;/tt&gt; makes the total structure size exceed 1024 bytes (&lt;tt&gt;slabinfo&lt;/tt&gt; shows &lt;tt&gt;ptlrpc_cache&lt;/tt&gt; is 1152 bytes in my system).  Since this field is 327 bytes and is relatively rarely used, it would be possible to allocate the string from a separate slab on systems that have this feature enabled, point at a preallocated/preformatted refcounted/RCU policy string (i.e. &lt;tt&gt;ptlrpc_sec-&amp;gt;ps_sepol&lt;/tt&gt;?) instead of copying it into each &lt;tt&gt;ptlrpc_request&lt;/tt&gt; (if the policies rarely change), or otherwise avoid allocating it when this feature is unused.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
#define SELINUX_MODE_LEN 1
#define SELINUX_POLICY_VER_LEN 3 &lt;span class=&quot;code-comment&quot;&gt;/* 3 chars to leave room &lt;span class=&quot;code-keyword&quot;&gt;for&lt;/span&gt; the &lt;span class=&quot;code-keyword&quot;&gt;future&lt;/span&gt; */&lt;/span&gt;
#define SELINUX_POLICY_HASH_LEN 64
#define LUSTRE_NODEMAP_SEPOL_LENGTH (SELINUX_MODE_LEN + NAME_MAX + \
                                     SELINUX_POLICY_VER_LEN + \
                                     SELINUX_POLICY_HASH_LEN + 3)
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;This memory reduction is particularly useful on the server where it needs to store many thousands of incoming RPC requests, and this field is never used.  Unfortunately, just adding it to &lt;tt&gt;struct ptlrpc_cli_req&lt;/tt&gt; will not reduce the space usage, since that is already the larger of the two structs in the union, but it wouldn&apos;t be terrible to move the &lt;tt&gt;rq_sepol&lt;/tt&gt; &lt;b&gt;pointer&lt;/b&gt; into &lt;tt&gt;ptlrpc_cli_req&lt;/tt&gt; so that it is more clear this is only used on the client.&lt;/p&gt;</description>
                <environment></environment>
        <key id="74721">LU-16566</key>
            <summary>rq_sepol makes ptlrpc_request exceed 1024 bytes</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="1">Fixed</resolution>
                                        <assignee username="eaujames">Etienne Aujames</assignee>
                                    <reporter username="adilger">Andreas Dilger</reporter>
                        <labels>
                            <label>SELinux</label>
                            <label>lug23dd</label>
                    </labels>
                <created>Fri, 17 Feb 2023 01:30:15 +0000</created>
                <updated>Sun, 4 Feb 2024 14:36:33 +0000</updated>
                            <resolved>Sun, 4 Feb 2024 14:36:33 +0000</resolved>
                                    <version>Lustre 2.16.0</version>
                    <version>Lustre 2.12.9</version>
                    <version>Lustre 2.15.2</version>
                                    <fixVersion>Lustre 2.16.0</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="363141" author="adilger" created="Fri, 17 Feb 2023 01:35:44 +0000"  >&lt;p&gt;I was wondering if there was a race between updating &lt;tt&gt;rq_sepol&lt;/tt&gt; and/or &lt;tt&gt;ps_sepol&lt;/tt&gt; via the upcall vs. copying the policy into the RPC, but I think that is a non-issue so long as the policy itself is not half updated when it is copied into the RPC.  In the vast majority of cases, the policy will not be changing, and in very rare cases when it does, it isn&apos;t clear if it would be &lt;b&gt;worse&lt;/b&gt; to send the new client policy to the MDS than the old one?  The policy update is itself lazy and racy vs. the RPC creation so I don&apos;t think it makes a difference either way.&lt;/p&gt;</comment>
                            <comment id="390778" author="gerrit" created="Thu, 26 Oct 2023 21:41:00 +0000"  >&lt;p&gt;&quot;Etienne AUJAMES &amp;lt;eaujames@ddn.com&amp;gt;&quot; uploaded a new patch: &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/52845&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/52845&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16566&quot; title=&quot;rq_sepol makes ptlrpc_request exceed 1024 bytes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16566&quot;&gt;&lt;del&gt;LU-16566&lt;/del&gt;&lt;/a&gt; sptlrpc: remove rq_sepol from ptlrpc_request&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: 1&lt;br/&gt;
Commit: 4029b01a99e1961cef63cc4ab19663e161723756&lt;/p&gt;</comment>
                            <comment id="402547" author="gerrit" created="Sun, 4 Feb 2024 08:28:17 +0000"  >&lt;p&gt;&quot;Oleg Drokin &amp;lt;green@whamcloud.com&amp;gt;&quot; merged in patch &lt;a href=&quot;https://review.whamcloud.com/c/fs/lustre-release/+/52845/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://review.whamcloud.com/c/fs/lustre-release/+/52845/&lt;/a&gt;&lt;br/&gt;
Subject: &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-16566&quot; title=&quot;rq_sepol makes ptlrpc_request exceed 1024 bytes&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-16566&quot;&gt;&lt;del&gt;LU-16566&lt;/del&gt;&lt;/a&gt; sptlrpc: remove rq_sepol from ptlrpc_request&lt;br/&gt;
Project: fs/lustre-release&lt;br/&gt;
Branch: master&lt;br/&gt;
Current Patch Set: &lt;br/&gt;
Commit: 3f70481c93dcabbb30267608a0054f4d7092e0db&lt;/p&gt;</comment>
                            <comment id="402580" author="pjones" created="Sun, 4 Feb 2024 14:36:33 +0000"  >&lt;p&gt;Merged for 2.16&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="42505">LU-8955</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i03edb:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>