Hi Alex!

A splendidly prompt piece of cherry-picking. Many thanks.

I've checked your test release on my Ryzen 2400G on current Ubuntu 20.10 and it 
still gives the diagostic:
  AMD-Vi: Unable to read/write to IOMMU perf counter

It's to be expected! The little crew engaged with testing Suravee
Suthikulpanit's patch [1] are finding that the 2400G (that's me) needs
120 msec for power-gating and the 2200G (that's Paul Menzel] needs >200
msecs. Suravee's RFC v3 provides 5 x 20 msecs delay which just isn't
enough for these lesser Ryzen's :-).

If you change Suravee's patch line

   for (retry = 5; retry; retry--) {
to
   for (retry = 25; retry; retry--) {

all will be well (imho). The maximum delay is indeed outrageous but only
that really necessary to enable IOMMU is actually used. Eventually a
proper solution will be found (in firmware or silicon) but (unlike at
present) the many users of entry-level Ryzen CPU's will not have their
IOMMU crippled during linux boot-up.

Incidentally, if you do rebuild your (very kind) test-release with the
above change (please, please), could you also include the deb package
for linux-tools for the same kernel. Things like the command "perf stat
-a -e amd_iommu/mem_trans_total/ test" (used to test IOMMU performance
in user-space) are tied to the running kernel-version and will then
work.

Best regards and again many thanks

David

[1] https://bugzilla.kernel.org/show_bug.cgi?id=201753

** Bug watch added: Linux Kernel Bug Tracker #201753
   https://bugzilla.kernel.org/show_bug.cgi?id=201753

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1917203

Title:
  AMD-Vi: Unable to read/write to IOMMU perf counter

Status in linux package in Ubuntu:
  In Progress

Bug description:
  This boot warning (concealed by grub not taking over the fbcon console
  on a solo installation but always present on a multi-boot) has been
  bothering Linux users of AMD Ryzen machines for some time.

  The problem is currently under discussion at kernel level
  <https://bugzilla.kernel.org/show_bug.cgi?id=201753>.

  One solution proposed by Suravee Suthikulpanit
  <suravee.suthikulpa...@amd.com>  <https://lkml.org/lkml/2021/2/8/486>
  works but inserts a boot-up delay of (at least) 100 msec. A second
  option by Alexander Monakov <amona...@ispras.ru>
  <https://bugzilla.kernel.org/show_bug.cgi?id=201753> also works but
  inserts no delay and more-or-less just moves one line of code.

  I've tried both solutions with kernel rebuilds for both Breezy kernel
  5.8.18 and Hirsute kernel 5.10.11 and both work on my AMD Ryzen 2400G.
  Could I encourage your kernel experts to evaluate the situation (I
  think SuSE folk already are).

  My suggestion (as a humble user :-) ) would be to fold Alex's simple
  patch into your own list of kernel tweeks and get the correction out
  with the upcoming Hirsute release.

  Best regards and all respect!

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1917203/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to