[Accel-config] Re: [PATCH] accel-config/test: load/unload uacce module at cleanup

Dave Jiang <dave.jiang at intel.com>
Newsgroups dev.linux.lists.accel-config
Message-ID <[email protected]>
attachment.htm (text/html, 3.8 KB)
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 4/6/2021 1:11 PM, Luck, Tony wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:[email protected]">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <style>@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
	{mso-style-priority:99;
	mso-style-link:"Plain Text Char";
	margin:0in;
	font-size:11.0pt;
	font-family:"Arial",sans-serif;}span.PlainTextChar
	{mso-style-name:"Plain Text Char";
	mso-style-priority:99;
	mso-style-link:"Plain Text";
	font-family:"Arial",sans-serif;}.MsoChpDefault
	{mso-style-type:export-only;
	font-family:"Calibri",sans-serif;}div.WordSection1
	{page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoPlainText" style="margin-left:.5in">       -r,
          --remove<o:p></o:p></p>
        <p class="MsoPlainText" style="margin-left:.5in">           This
          option causes modprobe to remove rather than insert a
          <o:p></o:p></p>
        <p class="MsoPlainText" style="margin-left:.5in">module. <span
            style="background:yellow;mso-highlight:yellow">
            If the modules it depends on are also unused</span>,
          modprobe will try to remove them
          <o:p></o:p></p>
        <p class="MsoPlainText" style="margin-left:.5in">too. Unlike
          insertion, more than one module can be specified on the
          command line (it
          <o:p></o:p></p>
        <p class="MsoPlainText" style="margin-left:.5in">does not make
          sense to specify module parameters when removing modules).<o:p></o:p></p>
        <p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
        <p class="MsoPlainText"><span style="color:black">Maybe a bug in
            modprobe?  It shouldn’t try to remove idxd when the first of
            the<o:p></o:p></span></p>
        <p class="MsoPlainText"><span style="color:black">dependent
            modules is removed (because idxd is still “in use” by the
            other).<o:p></o:p></span></p>
        <p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
        <p class="MsoPlainText"><span style="color:black">Either that,
            or IDXD and these two dependent modules aren’t setting the
            right<o:p></o:p></span></p>
        <p class="MsoPlainText"><span style="color:black">bits to let
            modprobe know what is going on?<o:p></o:p></span></p>
        <p class="MsoPlainText"><span style="color:black"><o:p> </o:p></span></p>
        <p class="MsoPlainText"><span style="color:black">-Tony<o:p></o:p></span></p>
        <p class="MsoPlainText"><o:p> </o:p></p>
      </div>
    </blockquote>
    <p>Maybe modprobe. When you do lsmod, the deps seems clear.</p>
    <pre># lsmod | grep idxd
idxd_mdev              45056  0
idxd_uacce             16384  0
uacce                  16384  1 idxd_uacce
idxd                  106496  2 idxd_mdev,idxd_uacce
vfio_pci               61440  2 idxd,idxd_mdev

</pre>
    <p>But once the last sub-module is removed, idxd no longer has any
      deps. I think that's why the kernel thinks it's a library module
      and attempt to remove it. I used to take a reference against the
      module when the device is enabled. Dan says not to do that. <br>
    </p>
  </body>
</html>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.