Displaying 20 results from an estimated 61 matches for "prepare_to_wait".
2013 Aug 28
2
[PATCH-v3 1/4] idr: Percpu ida
On Wed, 28 Aug 2013 12:53:17 -0700 Kent Overstreet <kmo at daterainc.com> wrote:
> > > + while (1) {
> > > + spin_lock(&pool->lock);
> > > +
> > > + /*
> > > + * prepare_to_wait() must come before steal_tags(), in case
> > > + * percpu_ida_free() on another cpu flips a bit in
> > > + * cpus_have_tags
> > > + *
> > > + * global lock held and irqs disabled, don't need percpu lock
> > > + */
> > > + prepare_...
2013 Aug 28
2
[PATCH-v3 1/4] idr: Percpu ida
On Wed, 28 Aug 2013 12:53:17 -0700 Kent Overstreet <kmo at daterainc.com> wrote:
> > > + while (1) {
> > > + spin_lock(&pool->lock);
> > > +
> > > + /*
> > > + * prepare_to_wait() must come before steal_tags(), in case
> > > + * percpu_ida_free() on another cpu flips a bit in
> > > + * cpus_have_tags
> > > + *
> > > + * global lock held and irqs disabled, don't need percpu lock
> > > + */
> > > + prepare_...
2012 Apr 11
1
CentOS 5 - problem with kernel/process: task blocked for more than 120 seconds.
...000000
c750b10c c17f6d00 d2637580
Apr 11 10:13:29 server kernel: f75d3e68 00000000 00000000 d1adeecc c041ec40
00000000 d1adeed8 f75d3e50
Apr 11 10:13:29 server kernel: Call Trace:
Apr 11 10:13:29 server kernel: [<c041ec40>] __wake_up+0x2a/0x3d
Apr 11 10:13:29 server kernel: [<c0436d23>] prepare_to_wait+0x24/0x46
Apr 11 10:13:29 server kernel: [<f885f1e2>] log_wait_commit+0x80/0xc7 [jbd]
Apr 11 10:13:29 server kernel: [<c0436bd7>]
autoremove_wake_function+0x0/0x2d
Apr 11 10:13:29 server kernel: [<f885a661>] journal_stop+0x195/0x1ba [jbd]
Apr 11 10:13:29 server kernel: [<c0495c...
2013 Aug 20
5
[PATCH-v3 1/4] idr: Percpu ida
...ags = this_cpu_ptr(pool->tag_cpu);
> +
> + /* Fastpath */
> + tag = alloc_local_tag(pool, tags);
> + if (likely(tag >= 0)) {
> + local_irq_restore(flags);
> + return tag;
> + }
> +
> + while (1) {
> + spin_lock(&pool->lock);
> +
> + /*
> + * prepare_to_wait() must come before steal_tags(), in case
> + * percpu_ida_free() on another cpu flips a bit in
> + * cpus_have_tags
> + *
> + * global lock held and irqs disabled, don't need percpu lock
> + */
> + prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE)...
2013 Aug 20
5
[PATCH-v3 1/4] idr: Percpu ida
...ags = this_cpu_ptr(pool->tag_cpu);
> +
> + /* Fastpath */
> + tag = alloc_local_tag(pool, tags);
> + if (likely(tag >= 0)) {
> + local_irq_restore(flags);
> + return tag;
> + }
> +
> + while (1) {
> + spin_lock(&pool->lock);
> +
> + /*
> + * prepare_to_wait() must come before steal_tags(), in case
> + * percpu_ida_free() on another cpu flips a bit in
> + * cpus_have_tags
> + *
> + * global lock held and irqs disabled, don't need percpu lock
> + */
> + prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE)...
2013 Aug 28
0
[PATCH-v3 1/4] idr: Percpu ida
...01:23:32PM -0700, Andrew Morton wrote:
> On Wed, 28 Aug 2013 12:53:17 -0700 Kent Overstreet <kmo at daterainc.com> wrote:
>
> > > > + while (1) {
> > > > + spin_lock(&pool->lock);
> > > > +
> > > > + /*
> > > > + * prepare_to_wait() must come before steal_tags(), in case
> > > > + * percpu_ida_free() on another cpu flips a bit in
> > > > + * cpus_have_tags
> > > > + *
> > > > + * global lock held and irqs disabled, don't need percpu lock
> > > > + */
&...
2006 Aug 14
0
Question concerning the EXT3 Journaling code
......
if (journal->j_barrier_count) {
spin_unlock(&journal->j_state_lock);
wait_event(...);
goto repeat;
}
...
if (...) {
prepare_to_wait(...);
spin_unlock(&journal->j_state_lock);
schedule();
finish_wait(...);
goto repeat;
}
...
The last "if (...)" represents 2 additional conditions...
2013 Aug 28
0
[PATCH-v3 1/4] idr: Percpu ida
...>nr_free,
> > + pool->freelist, &pool->nr_free,
> > + min(pool->nr_free, IDA_PCPU_BATCH_MOVE));
> > +}
>
> Document this function?
Will do
> > + while (1) {
> > + spin_lock(&pool->lock);
> > +
> > + /*
> > + * prepare_to_wait() must come before steal_tags(), in case
> > + * percpu_ida_free() on another cpu flips a bit in
> > + * cpus_have_tags
> > + *
> > + * global lock held and irqs disabled, don't need percpu lock
> > + */
> > + prepare_to_wait(&pool->wait, &a...
2011 Nov 08
48
Need help with fixing the Xen waitqueue feature
The patch ''mem_event: use wait queue when ring is full'' I just sent out
makes use of the waitqueue feature. There are two issues I get with the
change applied:
I think I got the logic right, and in my testing vcpu->pause_count drops
to zero in p2m_mem_paging_resume(). But for some reason the vcpu does
not make progress after the first wakeup. In my debugging there is one
2013 Aug 16
0
[PATCH-v3 1/4] idr: Percpu ida
...+ unsigned long flags;
+ int tag;
+
+ local_irq_save(flags);
+ tags = this_cpu_ptr(pool->tag_cpu);
+
+ /* Fastpath */
+ tag = alloc_local_tag(pool, tags);
+ if (likely(tag >= 0)) {
+ local_irq_restore(flags);
+ return tag;
+ }
+
+ while (1) {
+ spin_lock(&pool->lock);
+
+ /*
+ * prepare_to_wait() must come before steal_tags(), in case
+ * percpu_ida_free() on another cpu flips a bit in
+ * cpus_have_tags
+ *
+ * global lock held and irqs disabled, don't need percpu lock
+ */
+ prepare_to_wait(&pool->wait, &wait, TASK_UNINTERRUPTIBLE);
+
+ if (!tags->nr_free)...
2013 Mar 26
1
ext4 deadlock issue
...5d03d20 0000000000000046 ffff881055d03ca0 ffffffff811ada77
ffff8810552e2400 ffff88109c6566e8 0000000000002f38 ffff8810546e1540
ffff8810546e1af8 ffff881055d03fd8 000000000000fb88 ffff8810546e1af8
Call Trace:
[<ffffffff811ada77>] ? __set_page_dirty+0x87/0xf0
[<ffffffff810923be>] ? prepare_to_wait+0x4e/0x80
[<ffffffffa01e881f>] jbd2_journal_commit_transaction+0x19f/0x14b0 [jbd2]
[<ffffffff810096f0>] ? __switch_to+0xd0/0x320
[<ffffffff8107e00c>] ? lock_timer_base+0x3c/0x70
[<ffffffff810920d0>] ? autoremove_wake_function+0x0/0x40
[<ffffffffa01eef78>] kjo...
2008 Nov 20
0
[PATCH] btrfs: sparse lock verification annotations for wait_on_state
...btrfs-unstable/fs/btrfs/extent_io.c 2008-11-20 19:38:44.000000000 +0100
@@ -577,6 +577,8 @@ EXPORT_SYMBOL(clear_extent_bit);
static int wait_on_state(struct extent_io_tree *tree,
struct extent_state *state)
+ __releases(tree->lock)
+ __acquires(tree->lock)
{
DEFINE_WAIT(wait);
prepare_to_wait(&state->wq, &wait, TASK_UNINTERRUPTIBLE);
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
2010 Aug 04
6
[PATCH -v2 0/3] jbd2 scalability patches
This version fixes three bugs in the 2nd patch of this series that
caused kernel BUG when the system was under race. We weren't accounting
with t_oustanding_credits correctly, and there were race conditions
caused by the fact the I had overlooked the fact that
__jbd2_log_wait_for_space() and jbd2_get_transaction() requires
j_state_lock to be write locked.
Theodore Ts'o (3):
jbd2: Use
2007 Aug 09
1
[RFC] All my fsync changes
...ock(&root->fs_info->fs_mutex);
mutex_lock(&root->fs_info->trans_mutex);
+ put_transaction(prev_trans, root);
}
}
- while (trans->transaction->num_writers > 1) {
+
+ do {
+ joined = cur_trans->num_joined;
WARN_ON(cur_trans != trans->transaction);
- prepare_to_wait(&trans->transaction->writer_wait, &wait,
+ prepare_to_wait(&cur_trans->writer_wait, &wait,
TASK_UNINTERRUPTIBLE);
- if (trans->transaction->num_writers <= 1)
- break;
+ if (cur_trans->num_writers <= 1 &&
+ (cur_trans->num_joined !=...
2008 Jan 08
1
[PATCH] kvm guest balloon driver
...;
+ virtballoon.dev->config->set(virtballoon.dev, 0,
+ &virtballoon.target_nrpages,
+ sizeof(virtballoon.target_nrpages));
+ }
+out:
+ return;
+}
+
+static int balloon_thread(void *p)
+{
+ struct virtballoon *v = p;
+ DEFINE_WAIT(wait);
+
+ set_freezable();
+ for (;;) {
+ prepare_to_wait(&v->balloon_wait, &wait, TASK_UNINTERRUPTIBLE);
+ schedule();
+ finish_wait(&v->balloon_wait, &wait);
+
+ try_to_freeze();
+
+ if (kthread_should_stop())
+ break;
+
+ if (v->target_nrpages != totalram_pages) {
+ int delta = totalram_pages - v->target_nrpages;
+...
2008 Jan 08
1
[PATCH] kvm guest balloon driver
...;
+ virtballoon.dev->config->set(virtballoon.dev, 0,
+ &virtballoon.target_nrpages,
+ sizeof(virtballoon.target_nrpages));
+ }
+out:
+ return;
+}
+
+static int balloon_thread(void *p)
+{
+ struct virtballoon *v = p;
+ DEFINE_WAIT(wait);
+
+ set_freezable();
+ for (;;) {
+ prepare_to_wait(&v->balloon_wait, &wait, TASK_UNINTERRUPTIBLE);
+ schedule();
+ finish_wait(&v->balloon_wait, &wait);
+
+ try_to_freeze();
+
+ if (kthread_should_stop())
+ break;
+
+ if (v->target_nrpages != totalram_pages) {
+ int delta = totalram_pages - v->target_nrpages;
+...
2008 Jan 14
6
[PATCH] KVM virtio balloon driver
...ze++;
+ totalram_pages--;
+ v->target_nrpages--;
+ }
+ spin_unlock(&v->plist_lock);
+ }
+ return;
+}
+
+static int balloon_thread(void *p)
+{
+ struct virtballoon *v = p;
+ DEFINE_WAIT(wait);
+ int rmmod = 0;
+
+ set_freezable();
+ while (!kthread_should_stop()) {
+ int delta;
+
+ prepare_to_wait(&v->balloon_wait, &wait, TASK_INTERRUPTIBLE);
+ schedule();
+ finish_wait(&v->balloon_wait, &wait);
+
+ try_to_freeze();
+
+ /* wait for kthread_stop() if rmmod has been called */
+ if (rmmod)
+ continue;
+
+ spin_lock_irq(&v->plist_lock);
+ delta = totalram_pa...
2008 Jan 14
6
[PATCH] KVM virtio balloon driver
...ze++;
+ totalram_pages--;
+ v->target_nrpages--;
+ }
+ spin_unlock(&v->plist_lock);
+ }
+ return;
+}
+
+static int balloon_thread(void *p)
+{
+ struct virtballoon *v = p;
+ DEFINE_WAIT(wait);
+ int rmmod = 0;
+
+ set_freezable();
+ while (!kthread_should_stop()) {
+ int delta;
+
+ prepare_to_wait(&v->balloon_wait, &wait, TASK_INTERRUPTIBLE);
+ schedule();
+ finish_wait(&v->balloon_wait, &wait);
+
+ try_to_freeze();
+
+ /* wait for kthread_stop() if rmmod has been called */
+ if (rmmod)
+ continue;
+
+ spin_lock_irq(&v->plist_lock);
+ delta = totalram_pa...
2013 Aug 16
6
[PATCH-v3 0/4] target/vhost-scsi: Add per-cpu ida tag pre-allocation for v3.12
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi folks,
This is an updated series for adding tag pre-allocation support of
target fabric descriptor memory, utilizing Kent's latest per-cpu ida
bits here, along with Christoph Lameter's latest comments:
[PATCH 04/10] idr: Percpu ida
http://marc.info/?l=linux-kernel&m=137160026006974&w=2
The first patch is a
2013 Aug 16
6
[PATCH-v3 0/4] target/vhost-scsi: Add per-cpu ida tag pre-allocation for v3.12
From: Nicholas Bellinger <nab at linux-iscsi.org>
Hi folks,
This is an updated series for adding tag pre-allocation support of
target fabric descriptor memory, utilizing Kent's latest per-cpu ida
bits here, along with Christoph Lameter's latest comments:
[PATCH 04/10] idr: Percpu ida
http://marc.info/?l=linux-kernel&m=137160026006974&w=2
The first patch is a