mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Skidanov, Alexey" <Alexey.Skidanov@amd.com>
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "Gabbay, Oded" <Oded.Gabbay@amd.com>
Subject: CONFIG_PREEMPT_COUNT
Date: Mon, 31 Mar 2014 10:38:12 +0000	[thread overview]
Message-ID: <AD975D71AAD7784D8D1265DF6444C2FD0132AD51@storexdag03.amd.com> (raw)

Hello,

I found that preempt_enable() and preempt_disable() macros are defined differently depending on CONFIG_PREEMPT_COUNT:
- They increment per CPU preemption counter, if CONFIG_PREEMPT_COUNT defined
- They do nothing (just call barrier), if not.
I have it undefined in my source tree.

The questions are:
1. What is the purpose of CONFIG_PREEMPT_COUNT define and how I can define it?
2. In the previous kernel versions, spin_lock() and spin_unlock() call preempt_enable() and preempt_disable() respectively, ensuring that the current task will not be preempted by any other task while lock is held. Is this still ensured with these macros defined as "do nothing" ?

Thanks
Alexey


             reply	other threads:[~2014-03-31 10:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-31 10:38 Skidanov, Alexey [this message]
2014-03-31 12:24 ` CONFIG_PREEMPT_COUNT Paul Bolle
2014-03-31 12:50   ` CONFIG_PREEMPT_COUNT Skidanov, Alexey

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=AD975D71AAD7784D8D1265DF6444C2FD0132AD51@storexdag03.amd.com \
    --to=alexey.skidanov@amd.com \
    --cc=Oded.Gabbay@amd.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®