All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Schnell <mschnell@lumino.de>
To: Mike Frysinger <vapier.adi@gmail.com>
Cc: linux-kernel@vger.kernel.org, nios2-dev <nios2-dev@sopc.et.ntust.edu.tw>
Subject: Re: atomic RAM ?
Date: Fri, 09 Apr 2010 11:23:08 +0200	[thread overview]
Message-ID: <4BBEF1FC.6060307@lumino.de> (raw)
In-Reply-To: <v2u8bd0f97a1004081836na92954bdu4ed473816dc831b9@mail.gmail.com>

On 04/09/2010 03:36 AM, Mike Frysinger wrote:
> i think you underestimate the task of customizing every userspace
> point that may want atomic instructions.  
I never said this would be easy ;) Maybe it's close to impossible :(

I had hoped modifying the "atomic" macros for the arch in question in a
way that they use a handle instead of a pointer to the "atomic" variable
in a compatible way and then modifying the code that uses these macros
in a way that theses handles are created by additional macros that with
other archs can be uses optionally (in a compatible way: returning the
appropriate pointer) could work. But of course you are correct that a
lot of code would need being inspected.
> and no matter what sized
> atomic region you pick, having it arbitrarily fail at runtime because
> applications have "too many" locks is a poor solution.
>   
Of course you are right, but not being able to allow for SMP is a poor
solution, too.

I suppose it's possible to generate a dedicated system error when an
application runs out of "pthread_mutex" locks (i.e. when the
atomic_malloc() function detects that the atomic RAM is exhausted). You
also can unexpectedly get a normal "out of memory" system in an
application error at any point (e.g. when opening a file) ;) I don't
suppose any "normal" embedded application will use more than some 100.
(In any case, it would be good to have a (of course no-SMP-)
distribution that uses the "atomic region" software workaround, as well,
in case the user does not want to implement the necessary custom
instructions. This would be usable for applications excessively
consuming of "atomic RAM", too.)

-Michael

      reply	other threads:[~2010-04-09  9:23 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08  7:32 atomic RAM ? Michael Schnell
     [not found] ` <4BBDA1CB.3070204@davidnewall.com>
2010-04-08  9:52   ` Michael Schnell
2010-04-12 12:54     ` Pavel Machek
2010-04-14  8:42       ` Michael Schnell
     [not found] ` <k2gbca41b4c1004080243nc45a10aereaae18557808c943@mail.gmail.com>
2010-04-08 10:12   ` Michael Schnell
2010-04-08 10:45 ` Alan Cox
2010-04-08 12:11   ` Michael Schnell
2010-04-08 12:14     ` David Miller
2010-04-08 12:30       ` Michael Schnell
2010-04-08 14:15         ` Arnd Bergmann
2010-04-09 10:54           ` Michael Schnell
     [not found]           ` <4BBEECC8.10005@lumino.de>
     [not found]             ` <201004091714.04990.arnd@arndb.de>
2010-04-12  9:58               ` Michael Schnell
2010-04-12 15:02                 ` Arnd Bergmann
2010-04-13 10:11                   ` Michael Schnell
     [not found]                 ` <u2j42b5547a1004120845x87d7f2f7wd4acea1144153dd6@mail.gmail.com>
2010-04-13  8:39                   ` [Nios2-dev] " Michael Schnell
2010-04-08 13:37     ` Alan Cox
2010-04-09 10:55       ` Michael Schnell
2010-04-09 11:54         ` Alan Cox
2010-04-09 12:53           ` Michael Schnell
2010-04-09 13:15             ` Alan Cox
2010-04-09 13:14               ` Michael Schnell
2010-04-09 13:32               ` Michael Schnell
2010-04-14 12:46       ` Michael Schnell
2010-04-14 12:57         ` Alan Cox
2010-04-14 14:38           ` Michael Schnell
2010-04-09  1:36 ` Mike Frysinger
2010-04-09  9:23   ` Michael Schnell [this message]

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=4BBEF1FC.6060307@lumino.de \
    --to=mschnell@lumino.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nios2-dev@sopc.et.ntust.edu.tw \
    --cc=vapier.adi@gmail.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 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.