From: Madper Xie <bbboson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Seiji Aguchi <seiji.aguchi-7rDLJAbr9SE@public.gmane.org>
Cc: "Madper Xie" <cxie-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>,
"Richard Weinberger" <richard-/L3Ra7n9ekc@public.gmane.org>,
"Tony Luck" <tony.luck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
"matt.fleming@intel.com"
<matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
linux-kernel
<linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Linux EFI" <linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
谢成骏 <bbboson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Subject: Re: [PATCH] Make efi-pstore return a unique id
Date: Thu, 21 Nov 2013 21:53:07 +0800 [thread overview]
Message-ID: <87txf5n9oc.fsf@gmail.com> (raw)
In-Reply-To: <A5ED84D3BB3A384992CBB9C77DEDA4D47FA0B6EF-ohthHghroY0jroPwUH3sq+6wyyQG6/Uh@public.gmane.org>
seiji.aguchi-7rDLJAbr9SE@public.gmane.org writes:
>> Then will lost the sequence of our log. We will get lots of entries like
>> "dmesg-efi-`unique but meaningless number here`" in pstore fs. Who will
>> know which file is the latest record?
>
> Ah, that's good point.
>
>> And another side, the combin of timestamp, count and part is unique. Why
>> we generate a unique number from a unique number?
>> if you think "making a string from three ints and then a parse it to a
>> int again" is odd, i'd like to use ((timestamp * 100 + part) * 100 +
>> count.
>
> How about calculating the number of digit of part /count, instead of using fixed "100"?
> We can ensure the uniqueness of each id by doing it.
>
> digit_num = log2(part)/log2(10) + 1
> timestamp * 10^(digit_num + 1)
>
Then we must implement a log10 and a pow func...
And reverting id to timestamp, part and count will hard if we using
unfixed length of count and id.
So i'd like to using fixed length. My dell xps has 128kb nvram
space. and it at most store 126 pstore entries. So I think 1000 will be
a safe value for count. For part, 100 should be okay. I don't think
there will be a large kmsg and we must split it into more than 100 parts.
> Seiji
WARNING: multiple messages have this Message-ID (diff)
From: Madper Xie <bbboson@gmail.com>
To: Seiji Aguchi <seiji.aguchi@hds.com>
Cc: "Madper Xie" <cxie@redhat.com>,
"Richard Weinberger" <richard@nod.at>,
"Tony Luck" <tony.luck@gmail.com>,
"matt.fleming@intel.com" <matt.fleming@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
"Linux EFI" <linux-efi@vger.kernel.org>, 谢成骏 <bbboson@gmail.com>
Subject: Re: [PATCH] Make efi-pstore return a unique id
Date: Thu, 21 Nov 2013 21:53:07 +0800 [thread overview]
Message-ID: <87txf5n9oc.fsf@gmail.com> (raw)
In-Reply-To: <A5ED84D3BB3A384992CBB9C77DEDA4D47FA0B6EF@USINDEM103.corp.hds.com>
seiji.aguchi@hds.com writes:
>> Then will lost the sequence of our log. We will get lots of entries like
>> "dmesg-efi-`unique but meaningless number here`" in pstore fs. Who will
>> know which file is the latest record?
>
> Ah, that's good point.
>
>> And another side, the combin of timestamp, count and part is unique. Why
>> we generate a unique number from a unique number?
>> if you think "making a string from three ints and then a parse it to a
>> int again" is odd, i'd like to use ((timestamp * 100 + part) * 100 +
>> count.
>
> How about calculating the number of digit of part /count, instead of using fixed "100"?
> We can ensure the uniqueness of each id by doing it.
>
> digit_num = log2(part)/log2(10) + 1
> timestamp * 10^(digit_num + 1)
>
Then we must implement a log10 and a pow func...
And reverting id to timestamp, part and count will hard if we using
unfixed length of count and id.
So i'd like to using fixed length. My dell xps has 128kb nvram
space. and it at most store 126 pstore entries. So I think 1000 will be
a safe value for count. For part, 100 should be okay. I don't think
there will be a large kmsg and we must split it into more than 100 parts.
> Seiji
next prev parent reply other threads:[~2013-11-21 13:53 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-01 16:14 [PATCH] Make efi-pstore return a unique id Madper Xie
2013-11-01 16:14 ` Madper Xie
[not found] ` <87ppqk6qvx.fsf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-11-01 16:28 ` Richard Weinberger
2013-11-01 16:28 ` Richard Weinberger
[not found] ` <CAFLxGvz3pCevxE43zGnrbX4MxPmwyb=9MVNpzFRpELt1+AmtrA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-01 18:58 ` Tony Luck
2013-11-01 18:58 ` Tony Luck
[not found] ` <CA+8MBbJefz7L-C-LnhAAXB5zf-8XoMPhESPU4yd0wnuZ_YqO1w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-01 19:22 ` Seiji Aguchi
2013-11-01 19:22 ` Seiji Aguchi
[not found] ` <A5ED84D3BB3A384992CBB9C77DEDA4D47F9DD941-ohthHghroY0jroPwUH3sq+6wyyQG6/Uh@public.gmane.org>
2013-11-01 20:08 ` Richard Weinberger
2013-11-01 20:08 ` Richard Weinberger
[not found] ` <52740A3A.70202-/L3Ra7n9ekc@public.gmane.org>
2013-11-01 20:57 ` Seiji Aguchi
2013-11-01 20:57 ` Seiji Aguchi
[not found] ` <A5ED84D3BB3A384992CBB9C77DEDA4D47F9DDA4D-ohthHghroY0jroPwUH3sq+6wyyQG6/Uh@public.gmane.org>
2013-11-02 0:17 ` Tony Luck
2013-11-02 0:17 ` Tony Luck
[not found] ` <CA+8MBbKMRw28Ubr5F8U=5SKuaeutR+KEVDgJC70Xebj4O5BzpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-11-02 12:28 ` Seiji Aguchi
2013-11-02 12:28 ` Seiji Aguchi
2013-11-20 9:29 ` Madper Xie
2013-11-20 9:29 ` Madper Xie
[not found] ` <87r4abmnfb.fsf-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-11-20 15:17 ` Seiji Aguchi
2013-11-20 15:17 ` Seiji Aguchi
[not found] ` <A5ED84D3BB3A384992CBB9C77DEDA4D47FA0B6EF-ohthHghroY0jroPwUH3sq+6wyyQG6/Uh@public.gmane.org>
2013-11-21 13:53 ` Madper Xie [this message]
2013-11-21 13:53 ` Madper Xie
2013-11-02 1:15 ` Madper Xie
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=87txf5n9oc.fsf@gmail.com \
--to=bbboson-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=cxie-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=linux-efi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=matt.fleming-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=richard-/L3Ra7n9ekc@public.gmane.org \
--cc=seiji.aguchi-7rDLJAbr9SE@public.gmane.org \
--cc=tony.luck-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.