From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: hs@denx.de
Cc: linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-fbdev@vger.kernel.org,
Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Subject: Re: [RFC PATCH] video/logo: introduce new system state for checking if logos are freed
Date: Tue, 26 May 2015 06:54:33 +0000 [thread overview]
Message-ID: <556418A9.8010603@ti.com> (raw)
In-Reply-To: <5563EEF9.3080901@denx.de>
[-- Attachment #1: Type: text/plain, Size: 1084 bytes --]
On 26/05/15 06:56, Heiko Schocher wrote:
>> Without locking, the initmem may be freed while fb_find_logo() is
>> running.
>
> Yes, you are right, that must be added ... but has such a change a
> chance to go in mainline?
I don't know. To be honest, this whole thing feels a bit like hackery. I
think initdata should only be accessed from initcalls, never asynchronously.
> BTW: Could this not be currently a problem on multicore systems?
> If lets say core 2 just draws the logo, another core 1 calls
> fb_logo_late_init() and later core 1 free_initmem(), while the core 2
> still draws it?
Yes, I think so...
So, maybe it would be better to not even try to go forward with the
current approach. Two approaches come to my mind:
1) Keep the logos in the memory, and don't even try to free them. I
don't know many bytes they are in total, though.
2) Make a copy of the logos to a kmalloced area at some early boot
stage. Then manually free the logos at some point (after the first
access to the logos? after a certain time (urgh...)?).
Tomi
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-05-26 6:54 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-06 7:09 [RFC PATCH] video/logo: introduce new system state for checking if logos are freed Heiko Schocher
2015-05-25 5:57 ` Tomi Valkeinen
2015-05-26 3:56 ` Heiko Schocher
2015-05-26 6:54 ` Tomi Valkeinen [this message]
2015-05-26 7:08 ` Geert Uytterhoeven
2015-05-26 7:15 ` Tomi Valkeinen
2015-05-26 7:23 ` Geert Uytterhoeven
2015-05-26 7:29 ` Heiko Schocher
2015-05-26 7:17 ` Heiko Schocher
2015-05-26 7:25 ` Geert Uytterhoeven
2015-05-26 7:35 ` Heiko Schocher
2015-05-26 7:41 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=556418A9.8010603@ti.com \
--to=tomi.valkeinen@ti.com \
--cc=geert@linux-m68k.org \
--cc=hs@denx.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plagnioj@jcrosoft.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).