* (No subject header)
@ 2014-08-26 20:52 gina
0 siblings, 0 replies; 6+ messages in thread
From: gina @ 2014-08-26 20:52 UTC (permalink / raw)
You have just won £1,000,000GBP.Please Contact your Claims
Personnel with your email only to. nellydave1@gmail.com .for
info
......................................................................
NOTE : If You Recieve This Message In Your
Junk Or Spam Its Due To Your Internet
Provider.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 3/4] exec: unify compat_do_execve() code
@ 2010-11-30 20:01 Oleg Nesterov
2010-12-01 17:37 ` (No subject header) Milton Miller
0 siblings, 1 reply; 6+ messages in thread
From: Oleg Nesterov @ 2010-11-30 20:01 UTC (permalink / raw)
To: KOSAKI Motohiro, Andrew Morton, Linus Torvalds
Cc: LKML, linux-mm, pageexec, Solar Designer, Eugene Teo,
Brad Spengler, Roland McGrath
Teach get_arg_ptr() to handle compat = T case correctly.
This allows us to remove the compat_do_execve() code from fs/compat.c
and reimplement compat_do_execve() as the trivial wrapper on top of
do_execve_common(compat => true).
In fact, this fixes another (minor) bug. "compat_uptr_t str" can
overflow after "str += len" in compat_copy_strings() if a 64bit
application execs via sys32_execve().
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
---
fs/exec.c | 25 ++++++
fs/compat.c | 235 ------------------------------------------------------------
2 files changed, 25 insertions(+), 235 deletions(-)
--- K/fs/exec.c~3_use_compat 2010-11-30 19:47:24.000000000 +0100
+++ K/fs/exec.c 2010-11-30 20:15:11.000000000 +0100
@@ -55,6 +55,7 @@
#include <linux/fs_struct.h>
#include <linux/pipe_fs_i.h>
#include <linux/oom.h>
+#include <linux/compat.h>
#include <asm/uaccess.h>
#include <asm/mmu_context.h>
@@ -395,6 +396,18 @@ get_arg_ptr(const char __user * const __
{
const char __user *ptr;
+#ifdef CONFIG_COMPAT
+ if (unlikely(compat)) {
+ compat_uptr_t __user *a = (void __user*)argv;
+ compat_uptr_t p;
+
+ if (get_user(p, a + argc))
+ return ERR_PTR(-EFAULT);
+
+ return compat_ptr(p);
+ }
+#endif
+
if (get_user(ptr, argv + argc))
return ERR_PTR(-EFAULT);
@@ -1501,6 +1514,18 @@ int do_execve(const char *filename,
return do_execve_common(filename, argv, envp, regs, false);
}
+#ifdef CONFIG_COMPAT
+int compat_do_execve(char * filename,
+ compat_uptr_t __user *argv,
+ compat_uptr_t __user *envp,
+ struct pt_regs * regs)
+{
+ return do_execve_common(filename,
+ (void __user*)argv, (void __user*)envp,
+ regs, true);
+}
+#endif
+
void set_binfmt(struct linux_binfmt *new)
{
struct mm_struct *mm = current->mm;
--- K/fs/compat.c~3_use_compat 2010-11-30 18:30:45.000000000 +0100
+++ K/fs/compat.c 2010-11-30 20:17:28.000000000 +0100
@@ -1330,241 +1330,6 @@ compat_sys_openat(unsigned int dfd, cons
return do_sys_open(dfd, filename, flags, mode);
}
-/*
- * compat_count() counts the number of arguments/envelopes. It is basically
- * a copy of count() from fs/exec.c, except that it works with 32 bit argv
- * and envp pointers.
- */
-static int compat_count(compat_uptr_t __user *argv, int max)
-{
- int i = 0;
-
- if (argv != NULL) {
- for (;;) {
- compat_uptr_t p;
-
- if (get_user(p, argv))
- return -EFAULT;
- if (!p)
- break;
- argv++;
- if (i++ >= max)
- return -E2BIG;
-
- if (fatal_signal_pending(current))
- return -ERESTARTNOHAND;
- cond_resched();
- }
- }
- return i;
-}
-
-/*
- * compat_copy_strings() is basically a copy of copy_strings() from fs/exec.c
- * except that it works with 32 bit argv and envp pointers.
- */
-static int compat_copy_strings(int argc, compat_uptr_t __user *argv,
- struct linux_binprm *bprm)
-{
- struct page *kmapped_page = NULL;
- char *kaddr = NULL;
- unsigned long kpos = 0;
- int ret;
-
- while (argc-- > 0) {
- compat_uptr_t str;
- int len;
- unsigned long pos;
-
- if (get_user(str, argv+argc) ||
- !(len = strnlen_user(compat_ptr(str), MAX_ARG_STRLEN))) {
- ret = -EFAULT;
- goto out;
- }
-
- if (len > MAX_ARG_STRLEN) {
- ret = -E2BIG;
- goto out;
- }
-
- /* We're going to work our way backwords. */
- pos = bprm->p;
- str += len;
- bprm->p -= len;
-
- while (len > 0) {
- int offset, bytes_to_copy;
-
- if (fatal_signal_pending(current)) {
- ret = -ERESTARTNOHAND;
- goto out;
- }
- cond_resched();
-
- offset = pos % PAGE_SIZE;
- if (offset == 0)
- offset = PAGE_SIZE;
-
- bytes_to_copy = offset;
- if (bytes_to_copy > len)
- bytes_to_copy = len;
-
- offset -= bytes_to_copy;
- pos -= bytes_to_copy;
- str -= bytes_to_copy;
- len -= bytes_to_copy;
-
- if (!kmapped_page || kpos != (pos & PAGE_MASK)) {
- struct page *page;
-
- page = get_arg_page(bprm, pos, 1);
- if (!page) {
- ret = -E2BIG;
- goto out;
- }
-
- if (kmapped_page) {
- flush_kernel_dcache_page(kmapped_page);
- kunmap(kmapped_page);
- put_page(kmapped_page);
- }
- kmapped_page = page;
- kaddr = kmap(kmapped_page);
- kpos = pos & PAGE_MASK;
- flush_cache_page(bprm->vma, kpos,
- page_to_pfn(kmapped_page));
- }
- if (copy_from_user(kaddr+offset, compat_ptr(str),
- bytes_to_copy)) {
- ret = -EFAULT;
- goto out;
- }
- }
- }
- ret = 0;
-out:
- if (kmapped_page) {
- flush_kernel_dcache_page(kmapped_page);
- kunmap(kmapped_page);
- put_page(kmapped_page);
- }
- return ret;
-}
-
-/*
- * compat_do_execve() is mostly a copy of do_execve(), with the exception
- * that it processes 32 bit argv and envp pointers.
- */
-int compat_do_execve(char * filename,
- compat_uptr_t __user *argv,
- compat_uptr_t __user *envp,
- struct pt_regs * regs)
-{
- struct linux_binprm *bprm;
- struct file *file;
- struct files_struct *displaced;
- bool clear_in_exec;
- int retval;
-
- retval = unshare_files(&displaced);
- if (retval)
- goto out_ret;
-
- retval = -ENOMEM;
- bprm = kzalloc(sizeof(*bprm), GFP_KERNEL);
- if (!bprm)
- goto out_files;
-
- retval = prepare_bprm_creds(bprm);
- if (retval)
- goto out_free;
-
- retval = check_unsafe_exec(bprm);
- if (retval < 0)
- goto out_free;
- clear_in_exec = retval;
- current->in_execve = 1;
-
- file = open_exec(filename);
- retval = PTR_ERR(file);
- if (IS_ERR(file))
- goto out_unmark;
-
- sched_exec();
-
- bprm->file = file;
- bprm->filename = filename;
- bprm->interp = filename;
-
- retval = bprm_mm_init(bprm);
- if (retval)
- goto out_file;
-
- bprm->argc = compat_count(argv, MAX_ARG_STRINGS);
- if ((retval = bprm->argc) < 0)
- goto out;
-
- bprm->envc = compat_count(envp, MAX_ARG_STRINGS);
- if ((retval = bprm->envc) < 0)
- goto out;
-
- retval = prepare_binprm(bprm);
- if (retval < 0)
- goto out;
-
- retval = copy_strings_kernel(1, &bprm->filename, bprm);
- if (retval < 0)
- goto out;
-
- bprm->exec = bprm->p;
- retval = compat_copy_strings(bprm->envc, envp, bprm);
- if (retval < 0)
- goto out;
-
- retval = compat_copy_strings(bprm->argc, argv, bprm);
- if (retval < 0)
- goto out;
-
- retval = search_binary_handler(bprm, regs);
- if (retval < 0)
- goto out;
-
- /* execve succeeded */
- current->fs->in_exec = 0;
- current->in_execve = 0;
- acct_update_integrals(current);
- free_bprm(bprm);
- if (displaced)
- put_files_struct(displaced);
- return retval;
-
-out:
- if (bprm->mm) {
- acct_arg_size(bprm, 0);
- mmput(bprm->mm);
- }
-
-out_file:
- if (bprm->file) {
- allow_write_access(bprm->file);
- fput(bprm->file);
- }
-
-out_unmark:
- if (clear_in_exec)
- current->fs->in_exec = 0;
- current->in_execve = 0;
-
-out_free:
- free_bprm(bprm);
-
-out_files:
- if (displaced)
- reset_files_struct(displaced);
-out_ret:
- return retval;
-}
-
#define __COMPAT_NFDBITS (8 * sizeof(compat_ulong_t))
static int poll_select_copy_remaining(struct timespec *end_time, void __user *p,
^ permalink raw reply [flat|nested] 6+ messages in thread* (No subject header)
2010-11-30 20:01 [PATCH 3/4] exec: unify compat_do_execve() code Oleg Nesterov
@ 2010-12-01 17:37 ` Milton Miller
2010-12-01 18:27 ` Oleg Nesterov
0 siblings, 1 reply; 6+ messages in thread
From: Milton Miller @ 2010-12-01 17:37 UTC (permalink / raw)
To: Oleg Nesterov
Cc: KOSAKI Motohiro, Andrew Morton, Linus Torvalds, LKML, linux-mm,
pageexec, Solar Designer, Eugene Teo, Brad Spengler,
Roland McGrath
On Tue, 30 Nov 2010 about 20:01:29 -0000, Oleg Nesterov wrote:
> Teach get_arg_ptr() to handle compat = T case correctly.
> #include <asm/uaccess.h>
> #include <asm/mmu_context.h>
> @@ -395,6 +396,18 @@ get_arg_ptr(const char __user * const __
> {
> const char __user *ptr;
>
> +#ifdef CONFIG_COMPAT
> + if (unlikely(compat)) {
This should not be marked unlikely. Unlikely tells gcc the path
with over 99% confidence and disables branch predictors on some
architectures. If called from a compat processes this will result
in a mispredicted branch every iteration. Just use if (compat)
and let the hardware branch predictors do their job.
> + compat_uptr_t __user *a = (void __user*)argv;
> + compat_uptr_t p;
> +
> + if (get_user(p, a + argc))
> + return ERR_PTR(-EFAULT);
> +
> + return compat_ptr(p);
> + }
> +#endif
> +
> if (get_user(ptr, argv + argc))
> return ERR_PTR(-EFAULT);
>
> @@ -1501,6 +1514,18 @@ int do_execve(const char *filename,
> return do_execve_common(filename, argv, envp, regs, false);
> }
>
> +#ifdef CONFIG_COMPAT
> +int compat_do_execve(char * filename,
> + compat_uptr_t __user *argv,
> + compat_uptr_t __user *envp,
> + struct pt_regs * regs)
> +{
> + return do_execve_common(filename,
> + (void __user*)argv, (void __user*)envp,
Shouldn't these be compat_ptr(argv)? (makes a difference on s390)
> + regs, true);
> +}
> +#endif
> +
> void set_binfmt(struct linux_binfmt *new)
> {
> struct mm_struct *mm = current->mm;
Thanks,
milton
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: (No subject header)
2010-12-01 17:37 ` (No subject header) Milton Miller
@ 2010-12-01 18:27 ` Oleg Nesterov
0 siblings, 0 replies; 6+ messages in thread
From: Oleg Nesterov @ 2010-12-01 18:27 UTC (permalink / raw)
To: Milton Miller
Cc: KOSAKI Motohiro, Andrew Morton, Linus Torvalds, LKML, linux-mm,
pageexec, Solar Designer, Eugene Teo, Brad Spengler,
Roland McGrath
On 12/01, Milton Miller wrote:
>
> On Tue, 30 Nov 2010 about 20:01:29 -0000, Oleg Nesterov wrote:
> > Teach get_arg_ptr() to handle compat = T case correctly.
>
> > #include <asm/uaccess.h>
> > #include <asm/mmu_context.h>
> > @@ -395,6 +396,18 @@ get_arg_ptr(const char __user * const __
> > {
> > const char __user *ptr;
> >
> > +#ifdef CONFIG_COMPAT
> > + if (unlikely(compat)) {
>
> This should not be marked unlikely. Unlikely tells gcc the path
> with over 99% confidence and disables branch predictors on some
> architectures. If called from a compat processes this will result
> in a mispredicted branch every iteration. Just use if (compat)
> and let the hardware branch predictors do their job.
This applies to almost every likely/unlikely, and I think that compat
processes should fall into "unlikely category". But I don't really mind,
I can remove this hint, I added it mostly as documentation.
> > +#ifdef CONFIG_COMPAT
> > +int compat_do_execve(char * filename,
> > + compat_uptr_t __user *argv,
> > + compat_uptr_t __user *envp,
> > + struct pt_regs * regs)
> > +{
> > + return do_execve_common(filename,
> > + (void __user*)argv, (void __user*)envp,
>
> Shouldn't these be compat_ptr(argv)? (makes a difference on s390)
I'll recheck, but I don't think so. Please note that compat_ptr()
accepts "compat_uptr_t", not "compat_uptr_t *".
argv should be correct as a pointer to user-space, otherwise the
current code is buggy. For example, compat_do_execve() passes
argv to compat_count() which does get_user(argv) without any
conversion.
IOW, even if this should be fixed, I think this have nothing to
do with this patch. But I'll recheck, thanks.
Oleg.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Doubt about CRTSCTS preprocessor macro definition in termbits.h file
@ 2010-11-09 7:27 Ramya Desai
2010-11-09 16:56 ` (No subject header) Milton Miller
0 siblings, 1 reply; 6+ messages in thread
From: Ramya Desai @ 2010-11-09 7:27 UTC (permalink / raw)
To: linux-kernel
Dear All,
I did not understand the CRTSCTS preprocessor macro which is defined
in termbits.h file.
http://lxr.linux.no/linux+v2.6.36/include/asm-generic/termbits.h
As per the typedefs defined in the beginning of the file, the c_cflag
is unsigned int member in the struct termios structure. The CRTSCTS is
defined in the file as a 48 bit value.
#define CRTSCTS 020000000000 /* flow control */
I saw the following snippet in one of the serial applications.
struct termios newtio;
newtio.c_cflag = B9600 | CRTSCTS | CS8 | CLOCAL | CREAD;
My question is, the c_cflag is a 32 bit value member and the CRTSCTS
is a 48 bit value. How CRTSCTS is accommodates into c_cflag variable?
Please let me know, if my interpretation is wrong.
Thanks in advance.
Regards,
Ramya.
^ permalink raw reply [flat|nested] 6+ messages in thread
* (No subject header)
2010-11-09 7:27 Doubt about CRTSCTS preprocessor macro definition in termbits.h file Ramya Desai
@ 2010-11-09 16:56 ` Milton Miller
0 siblings, 0 replies; 6+ messages in thread
From: Milton Miller @ 2010-11-09 16:56 UTC (permalink / raw)
To: Ramya Desai; +Cc: linux-kernel
On Tue Nov 09 2010 around 02:27:38 EST, Ramya Desai wrote:
> I did not understand the CRTSCTS preprocessor macro which is defined
> in termbits.h file.
..
> As per the typedefs defined in the beginning of the file, the c_cflag
> is unsigned int member in the struct termios structure. The CRTSCTS is
> defined in the file as a 48 bit value.
>
> #define CRTSCTS 020000000000 /* flow control */
That is not a 48 bit value.
>
> I saw the following snippet in one of the serial applications.
>
> struct termios newtio;
> newtio.c_cflag = B9600 | CRTSCTS | CS8 | CLOCAL | CREAD;
>
> My question is, the c_cflag is a 32 bit value member and the CRTSCTS
> is a 48 bit value. How CRTSCTS is accommodates into c_cflag variable?
> Please let me know, if my interpretation is wrong.
>
> Thanks in advance.
Hint: constants in C may be expressed in base 16, 10, or 8.
milton
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 5/8] sched: clarify commment for TS_POLLING
2010-05-27 2:42 ` [PATCH 1/8] cpuidle: fail to register if !CONFIG_CPU_IDLE Len Brown
@ 2010-05-27 2:42 Len Brown
2010-05-27 2:42 ` idle-test patches queued for upstream Len Brown
0 siblings, 1 reply; 6+ messages in thread
From: Len Brown @ 2010-05-27 2:42 UTC (permalink / raw)
To: x86, linux-pm; +Cc: linux-kernel, Len Brown
From: Len Brown <len.brown@intel.com>
TS_POLLING set tells the scheduler a task will poll
need_resched() to look for work.
TS_POLLING clear tells resched_task() and wake_up_idle_cpu()
that the remote CPU is sleeping in idle, and thus requires
a reschedule interrupt to wake them to notice work.
Update the description of TS_POLLING to reflect how it works.
"cleared when sleeping in idle, requiring reschedule interrupt"
Signed-off-by: Len Brown <len.brown@intel.com>
Acked-by: Peter Zijlstra <peterz@infradead.org>
---
arch/x86/include/asm/thread_info.h | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/include/asm/thread_info.h b/arch/x86/include/asm/thread_info.h
index e0d2890..0a14da2 100644
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -241,8 +241,8 @@ static inline struct thread_info *current_thread_info(void)
#define TS_USEDFPU 0x0001 /* FPU was used by this task
this quantum (SMP) */
#define TS_COMPAT 0x0002 /* 32bit syscall active (64BIT)*/
-#define TS_POLLING 0x0004 /* true if in idle loop
- and not sleeping */
+#define TS_POLLING 0x0004 /* clear when sleeping in idle
+ requiring reschedule interrupt */
#define TS_RESTORE_SIGMASK 0x0008 /* restore signal mask in do_signal() */
#define TS_XSAVE 0x0010 /* Use xsave/xrstor */
--
1.6.0.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* idle-test patches queued for upstream
@ 2010-05-27 2:42 ` Len Brown
2010-05-27 2:42 ` [PATCH 1/8] cpuidle: fail to register if !CONFIG_CPU_IDLE Len Brown
0 siblings, 1 reply; 6+ messages in thread
From: Len Brown @ 2010-05-27 2:42 UTC (permalink / raw)
To: x86, linux-pm; +Cc: linux-kernel
Please look over and test this patch set.
(If you test linux-next, you already have it)
There are a few simple patches, leading up to a new intel_idle driver.
Note that you can get the patch series as a single patch here:
http://ftp.kernel.org/pub/linux/kernel/people/lenb/idle/patches/2.6.34/idle-test-2.6.34.diff.gz
or pull from this git branch
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-idle-2.6.git idle-test
Both are vs 2.6.34.
Why is it good to have a native intel_idle driver?
Basically, we think we can do better than ACPI.
Indeed, on my (production level commerically available) Nehalem desktop
the ACPI tables are broken and an ACPI OS idles at 100W. With this
driver the box idles at 85W.
Thanks,
-Len
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/8] cpuidle: fail to register if !CONFIG_CPU_IDLE
2010-05-27 2:42 ` idle-test patches queued for upstream Len Brown
@ 2010-05-27 2:42 ` Len Brown
2010-05-27 5:25 ` (No subject header) Milton Miller
0 siblings, 1 reply; 6+ messages in thread
From: Len Brown @ 2010-05-27 2:42 UTC (permalink / raw)
To: x86, linux-pm; +Cc: linux-kernel, Len Brown
From: Len Brown <len.brown@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
---
include/linux/cpuidle.h | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index dcf77fa..0fe1efe 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -137,16 +137,16 @@ extern void cpuidle_disable_device(struct cpuidle_device *dev);
#else
static inline int cpuidle_register_driver(struct cpuidle_driver *drv)
-{return 0;}
+{return -ENODEV;}
static inline void cpuidle_unregister_driver(struct cpuidle_driver *drv) { }
static inline int cpuidle_register_device(struct cpuidle_device *dev)
-{return 0;}
+{return -ENODEV;}
static inline void cpuidle_unregister_device(struct cpuidle_device *dev) { }
static inline void cpuidle_pause_and_lock(void) { }
static inline void cpuidle_resume_and_unlock(void) { }
static inline int cpuidle_enable_device(struct cpuidle_device *dev)
-{return 0;}
+{return -ENODEV;}
static inline void cpuidle_disable_device(struct cpuidle_device *dev) { }
#endif
--
1.6.0.6
^ permalink raw reply related [flat|nested] 6+ messages in thread* (No subject header)
2010-05-27 2:42 ` [PATCH 1/8] cpuidle: fail to register if !CONFIG_CPU_IDLE Len Brown
@ 2010-05-27 5:25 ` Milton Miller
2010-05-27 5:47 ` Len Brown
0 siblings, 1 reply; 6+ messages in thread
From: Milton Miller @ 2010-05-27 5:25 UTC (permalink / raw)
To: Len Brown; +Cc: Peter Zijlstra, linux-acpi, linux-kernel
[Hmm, why did this not appear in patchwork.kernel.org? Now
I have to guess a CC list.]
On Wed, 26 May 2010 around 22:43:50 -0400 (EDT), Len Brown wrote:
> From: Len Brown <len.brown@intel.com>
>
> TS_POLLING set tells the scheduler a task will poll
> need_resched() to look for work.
>
True
> TS_POLLING clear tells resched_task() and wake_up_idle_cpu()
> that the remote CPU is sleeping in idle, and thus requires
> a reschedule interrupt to wake them to notice work.
No, that only applies to the idle task.
>
> Update the description of TS_POLLING to reflect how it works.
> "cleared when sleeping in idle, requiring reschedule interrupt"
That would imply its set for every normal task that is not in some
kind of sleep state.
>
> Signed-off-by: Len Brown <len.brown@intel.com>
> Acked-by: Peter Zijlstra <peterz@infradead.org>
> -#define TS_POLLING 0x0004 /* true if in idle loop
> - and not sleeping */
> +#define TS_POLLING 0x0004 /* clear when sleeping in idle
> + requiring reschedule interrupt */
How about "idle task polling need_resched, skip sending interrupt"?
milton
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: (No subject header)
2010-05-27 5:25 ` (No subject header) Milton Miller
@ 2010-05-27 5:47 ` Len Brown
0 siblings, 0 replies; 6+ messages in thread
From: Len Brown @ 2010-05-27 5:47 UTC (permalink / raw)
To: Milton Miller; +Cc: Len Brown, Peter Zijlstra, linux-acpi, linux-kernel
On Thu, 27 May 2010, Milton Miller wrote:
>
> [Hmm, why did this not appear in patchwork.kernel.org? Now
> I have to guess a CC list.]
>
> On Wed, 26 May 2010 around 22:43:50 -0400 (EDT), Len Brown wrote:
> > From: Len Brown <len.brown@intel.com>
> >
> > TS_POLLING set tells the scheduler a task will poll
> > need_resched() to look for work.
> >
>
> True
>
> > TS_POLLING clear tells resched_task() and wake_up_idle_cpu()
> > that the remote CPU is sleeping in idle, and thus requires
> > a reschedule interrupt to wake them to notice work.
>
> No, that only applies to the idle task.
>
>
> >
> > Update the description of TS_POLLING to reflect how it works.
> > "cleared when sleeping in idle, requiring reschedule interrupt"
>
> That would imply its set for every normal task that is not in some
> kind of sleep state.
you're right, just the idle task sets this flag.
> > Signed-off-by: Len Brown <len.brown@intel.com>
> > Acked-by: Peter Zijlstra <peterz@infradead.org>
>
> > -#define TS_POLLING 0x0004 /* true if in idle loop
> > - and not sleeping */
> > +#define TS_POLLING 0x0004 /* clear when sleeping in idle
> > + requiring reschedule interrupt */
>
> How about "idle task polling need_resched, skip sending interrupt"?
I think that is an improvement over my wording.
Though technically we're not polling need_resched in the case
I have in mind. The hardware is snooping any write to the thread flags
via MONITOR/MWAIT trigger address.
cheers,
-Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-08-26 21:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-26 20:52 (No subject header) gina
-- strict thread matches above, loose matches on Subject: below --
2010-11-30 20:01 [PATCH 3/4] exec: unify compat_do_execve() code Oleg Nesterov
2010-12-01 17:37 ` (No subject header) Milton Miller
2010-12-01 18:27 ` Oleg Nesterov
2010-11-09 7:27 Doubt about CRTSCTS preprocessor macro definition in termbits.h file Ramya Desai
2010-11-09 16:56 ` (No subject header) Milton Miller
2010-05-27 2:42 [PATCH 5/8] sched: clarify commment for TS_POLLING Len Brown
2010-05-27 2:42 ` idle-test patches queued for upstream Len Brown
2010-05-27 2:42 ` [PATCH 1/8] cpuidle: fail to register if !CONFIG_CPU_IDLE Len Brown
2010-05-27 5:25 ` (No subject header) Milton Miller
2010-05-27 5:47 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).