mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Richter <stefanr@s5r6.in-berlin.de>
To: "Leonidas ." <leonidas137@gmail.com>
Cc: Gleb Natapov <gleb@redhat.com>,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: How to check whether executing in atomic context?
Date: Wed, 14 Oct 2009 21:15:39 +0200	[thread overview]
Message-ID: <4AD6235B.8090905@s5r6.in-berlin.de> (raw)
In-Reply-To: <f22d86810910141211u1f83f57fibfaa5ee19a39813f@mail.gmail.com>

Leonidas . wrote:
> On Wed, Oct 14, 2009 at 11:09 PM, Stefan Richter
> <stefanr@s5r6.in-berlin.de> wrote:
>> let the caller of your routine tell it whether it's atomic context
>> or not.
[...]
> What makes it more complicated is this, the user might achieve the
> functionality via instrumenting his source code, i.e. something like
> using -finstrument flag of gcc. As per above inferences about
> in_atomic(), in case of instrumentation there is no choice other than
> providing all apis as atomic apis, this might not be the right thing
> to do under all circumstances. Especially, for my code since I do lot
> of allocations for book keeping.
> 
> I am not aware of any Linux kernel module which can comply to this
> kind of use case, what would be the most optimal thing to do here?

And preallocation is not feasible either?
-- 
Stefan Richter
-=====-==--= =-=- -===-
http://arcgraph.de/sr/

  reply	other threads:[~2009-10-14 19:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14  6:36 Leonidas .
2009-10-14  9:21 ` Leonidas .
2009-10-14  9:34   ` Leonidas .
2009-10-14 10:13   ` Gleb Natapov
2009-10-14 10:24     ` Leonidas .
2009-10-14 17:39       ` Stefan Richter
2009-10-14 19:11         ` Leonidas .
2009-10-14 19:15           ` Stefan Richter [this message]
2009-10-14 19:22             ` Samuel Thibault
2009-10-14 19:24             ` Leonidas .
2009-10-15  8:31               ` Leonidas .

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=4AD6235B.8090905@s5r6.in-berlin.de \
    --to=stefanr@s5r6.in-berlin.de \
    --cc=gleb@redhat.com \
    --cc=leonidas137@gmail.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®