public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Zoltan Menyhart <Zoltan.Menyhart@bull.net>
To: linux-ia64@vger.kernel.org
Subject: Re: ia64_mca_cpe_int_handler
Date: Wed, 27 Feb 2008 12:18:12 +0000	[thread overview]
Message-ID: <47C55504.6070300@bull.net> (raw)
In-Reply-To: <47BF02EC.4080102@bull.net>

> Is this records per cpu or records total?

Well, I planed 2 + 2 global log buffers for MCA / INIT. (As today.)
The 1st CPU can use 1st buffer (and increments the atomic variable).
For additional MCAs, it fills in the 2nd buffer.
The other CPUs fill in the 2nd buffer, too.
Yes, we overwrite the 2nd buffer. It goes like this:
- increment the atomic variable, wmb()
- memcpy() the log into the 2nd buffer, wmb()
- increment the atomic variable
- before starting, verify if the atomic variable is odd,
  use compare-and-swap for the incrementing it

memcpy() should finish in a relatively short time.
Should it provoke another MCA...
(The actual code also assumes that the MCA handler is "hard core".)

We could have dedicated buffers to each CPU, and more than 2 of them
per CPU.
Yet all the resources have to be pre-allocated.
For some hopefully very unlikely events...

Eventually, this algorithm is easily modifiable to handle "n" buffers
(overwriting the last one).

Thanks,

Zoltan 

  parent reply	other threads:[~2008-02-27 12:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-22 17:14 ia64_mca_cpe_int_handler Zoltan Menyhart
2008-02-22 22:32 ` ia64_mca_cpe_int_handler Luck, Tony
2008-02-22 23:44 ` ia64_mca_cpe_int_handler Russ Anderson
2008-02-23  0:02 ` ia64_mca_cpe_int_handler Luck, Tony
2008-02-25 17:05 ` ia64_mca_cpe_int_handler Zoltan Menyhart
2008-02-26 21:01 ` ia64_mca_cpe_int_handler Russ Anderson
2008-02-27 10:06 ` ia64_mca_cpe_int_handler Zoltan Menyhart
2008-02-27 10:53 ` ia64_mca_cpe_int_handler Robin Holt
2008-02-27 12:18 ` Zoltan Menyhart [this message]
2008-02-27 16:29 ` ia64_mca_cpe_int_handler Russ Anderson

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=47C55504.6070300@bull.net \
    --to=zoltan.menyhart@bull.net \
    --cc=linux-ia64@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox