jimcuclamath
Posts: 5
Joined: Fri Sep 28, 2018 1:13 am

Where is the git repo with commits for VC4 death spiral?

Tue Dec 11, 2018 6:51 am

I have a Raspberry Pi 3B (not plus). The operating system is
OpenSuSE "Tumbleweed" version 20181101 (64bit). The current kernel
version is 4.18.15-1-default. My goal is to run Kodi, and a prerequisite
is to activate GPU acceleration, then check out the free video codecs,
then add the licenses for the non-free codecs.

I have dtoverlay=vc4-fkms-v3d (same results with dtoverlay=vc4-kms-v3d).
The GLMark2 overall score is 17fps with software GL versus 74fps with
vc4-fkms-v3d, so I have GPU acceleration working. However, this took
some minor non-SuSE hackery: manually install package Mesa-dri-vc4 which
they deliberately don't install by default, and edit
/etc/X11/xorg.conf.d/20-kms.conf and comment out option "AccelMethod"
"none". Credit to OP sdoconnell (2018-07-xx) in
https://www.reddit.com/r/openSUSE/comme ... _question/ .

SuSE consider OpenGL GPU acceleration to be "experimental", and with
good reason. While testing codecs I got stuck on a known bug:
https://github.com/raspberrypi/linux/issues/2680 (OP cbxbiker61,
2018-09-12), with responses by quite a number of people who contribute
to the RPi kernel port including @popcornmix. Summarizing the symptom
very briefly, users report free CMA memory declining continuously until
this message appears in syslog: "vc4_v3d 3fc00000.v3d: Failed to
allocate memory for tile binning: -12. You may need to enable CMA or
give it more memory." At that point the display can no longer be written
on (though keystrokes and mouse clicks are delivered to whoever has
focus). (More detail is available both in the above bug report and from
me, if needed.)

Different users with different kernel versions and apps report different
symptoms; for example the initial report in issue 2680 was about jam-ups
in sound production. I had one incident in which I logged in to the
LightDM greeter, starting a XFCE session, and opened one xterm, xload
-update 2 (secs), and the screensaver was set to only do DPMS off, no
eye candy. I let it incubate overnight, and after 5 hours it froze up
as above, having almost the same CMA free memory that it started with.
This says to me that the "death spiral" of declining memory is a
consequence of an unknown bug, when more typical apps like a web browser
continually do graphic operations and for some reason the CMA memory
that the driver allocates cannot be freed.

Issue 2680 includes references to several commits that have a favorable
effect on this problem, which the SuSE kernel did not get. I would
like to build kernels with these commits and try them out in the SuSE
context. If I'm successful I will append a report to
https://bugzilla.opensuse.org/show_bug.cgi?id=1117095 (2018-11-22).
But I can't find a git repo that has these commits. Can someone please
point me at the appropriate git URL? Or am I abusing git?

git clone --progress https://github.com/raspberrypi/linux
delivers a repo with remote branches from 3.2.27 to 4.19.y but it has
none of these commits according to (e.g.)
git show 3a1a31d70660f87ee7ec49ffc3811f633bb0f93d :
3a1a31d70660f87ee7ec49ffc3811f633bb0f93d (tree including the following)
87e36c2f85f100007bf40bd9be563e7e6197eb70 (@HiassofT blames the problem
on this commit (2018-10-06))
df5b90b0395f36366ae2b69bd5313808e7ca75fe (by @HiassofT reverting
GFP_NOIO (2018-09-17) which made the problem worse, also adding
a DMA pool)

I picked forum category "Using the Raspberry Pi - Advanced users"
because it has the announcement of Eric Anholt's vc4 driver; if it would
do better elsewhere would the moderator please move it? Thanks.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7008
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Where is the git repo with commits for VC4 death spiral?

Tue Dec 11, 2018 10:50 am

Pi Towers generally support the LTS kernel releases, so currently 4.14 and 4.19. All intermediate kernel branches are maintained only whilst they are the "current" release.
The "correct" fix for the issue is to use a CMA pool, and that is done in https://github.com/raspberrypi/linux/co ... 726768048f which is on both rpi-4.14.y and rpi-4.19.y.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7008
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Where is the git repo with commits for VC4 death spiral?

Tue Dec 11, 2018 11:02 am

I'll add that until a branch is adopted as the main release branch then the branches get rebased as upstream release updates. That probably explains why you can't find the commits now.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

swahren
Posts: 96
Joined: Mon Sep 19, 2016 5:24 pm
Location: Germany

Re: Where is the git repo with commits for VC4 death spiral?

Sat Dec 15, 2018 3:26 pm

The author of the DMA pool patch didn't had the time to upstream the patch. But i could prepare a upstream git repo for testing.

Return to “Advanced users”