linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Joel Stanley <joel@jms.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	linuxppc-dev@lists.ozlabs.org, Jeremy Kerr <jk@ozlabs.org>
Subject: Re: [PATCH] powerpc: opal-msglog: Report size of memcons log
Date: Wed, 25 Jan 2017 19:50:47 +1100	[thread overview]
Message-ID: <CACPK8Xd6ruhe1Fq3ERTDu655wkf0iP4TFych36KSm=8qdZK_bA@mail.gmail.com> (raw)
In-Reply-To: <874m0namx5.fsf@concordia.ellerman.id.au>

On Wed, Jan 25, 2017 at 1:33 PM, Michael Ellerman <mpe@ellerman.id.au> wrote:
> Michael Ellerman <mpe@ellerman.id.au> writes:
>
>> Joel Stanley <joel@jms.id.au> writes:
>>
>>> The OPAL memory console is reported to be size zero, as we do not
>>> initialise the struct attr with any size information due to the size
>>> being variable. This leads users to think that the console is empty.
>>
>> Hmm OK. That is a general property of /proc and /sys files that are
>> dynamically generated, so users probably need to get used to it :)
>>
>>> Instead report the maximum size.
>>
>> But OK. That sounds sane enough. My only worry is that it might confuse
>> some tools, ie. the file claims to be x bytes but is actually smaller.
>> But I guess that can actually happen anyway with any file.
>>
>> So I'll merge this and stop blabbing :)
>
> Hmm, but then I get:
>
>   $ ls -la msglog
>   -r--r--r-- 1 root root 4503599627370496 Jan 25 13:09 msglog
>
> I know firmware likes to spit out lots of messages, but 4PB seems a bit
> large :P
>
> I fixed it with the patch below which I'll fold in, resulting in:
>
>   $ ls -la msglog
>   -r--r--r-- 1 root root 1048576 Jan 25 13:30 msglog
>
>
> Which seems more likely.

My bad. In my excitement I forgot to mention that this was just an
idea, and I had not boot tested it.

Thanks for testing it and finding the bug.

Cheers,

Joel

  reply	other threads:[~2017-01-25  8:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13  3:53 [PATCH] powerpc: opal-msglog: Report size of memcons log Joel Stanley
2017-01-23  8:32 ` Michael Ellerman
2017-01-25  2:33   ` Michael Ellerman
2017-01-25  8:50     ` Joel Stanley [this message]
2017-01-27  0:40 ` Michael Ellerman

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='CACPK8Xd6ruhe1Fq3ERTDu655wkf0iP4TFych36KSm=8qdZK_bA@mail.gmail.com' \
    --to=joel@jms.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=jk@ozlabs.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    /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).