public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nish Aravamudan <nish.aravamudan@gmail.com>
To: johnpol@2ka.mipt.ru
Cc: Greg KH <greg@kroah.com>, linux-kernel@vger.kernel.org
Subject: Re: Kernel conector. Reincarnation #1.
Date: Thu, 13 Jan 2005 09:58:27 -0800	[thread overview]
Message-ID: <29495f1d050113095856d998ea@mail.gmail.com> (raw)
In-Reply-To: <20050113001611.0a5d8bf8@zanzibar.2ka.mipt.ru>

On Thu, 13 Jan 2005 00:16:11 +0300, Evgeniy Polyakov
<johnpol@2ka.mipt.ru> wrote:
> Sorry, forget about nasty typo.
> Current one is right.

<snip>

> diff -Nru /tmp/empty/cn_queue.c linux-2.6.9/drivers/connector/cn_queue.c
> --- /tmp/empty/cn_queue.c       1970-01-01 03:00:00.000000000 +0300
> +++ linux-2.6.9/drivers/connector/cn_queue.c    2005-01-12 23:23:45.000000000 +0300

<snip>

> +       while (atomic_read(&cbq->cb->refcnt)) {
> +               printk(KERN_INFO "Waiting for %s to become free: refcnt=%d.\n",
> +                      cbq->pdev->name, atomic_read(&cbq->cb->refcnt));
> +               set_current_state(TASK_INTERRUPTIBLE);
> +               schedule_timeout(HZ);
> +
> +               if (current->flags & PF_FREEZE)
> +                       refrigerator(PF_FREEZE);
> +
> +               if (signal_pending(current))
> +                       flush_signals(current);
> +       }

<snip>

> +       while (atomic_read(&dev->refcnt)) {
> +               printk(KERN_INFO "Waiting for %s to become free: refcnt=%d.\n",
> +                      dev->name, atomic_read(&dev->refcnt));
> +               set_current_state(TASK_INTERRUPTIBLE);
> +               schedule_timeout(HZ);
> +
> +               if (current->flags & PF_FREEZE)
> +                       refrigerator(PF_FREEZE);
> +
> +               if (signal_pending(current))
> +                       flush_signals(current);
> +       }

Would it be possible to use msleep_interruptible(1000) in both of
these locations? You only seem to be concerned with signals (not
wait-queue events) and the time is rather long (1000 msec).
signals_pending(current) will still be true upon return from
msleep_interruptible(), so it's a minimal change, I think.

Thanks,
Nish

  reply	other threads:[~2005-01-13 18:00 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1101286481.18807.66.camel@uganda>
     [not found] ` <1101287606.18807.75.camel@uganda>
     [not found]   ` <20041124222857.GG3584@kroah.com>
     [not found]     ` <1102504677.3363.55.camel@uganda>
     [not found]       ` <20041221204101.GA9831@kroah.com>
2004-12-22  9:21         ` Kernel conector. Reincarnation #1 Evgeniy Polyakov
2005-01-12 19:03           ` Greg KH
2005-01-12 20:33             ` Evgeniy Polyakov
2005-01-12 21:16               ` Evgeniy Polyakov
2005-01-13 17:58                 ` Nish Aravamudan [this message]
2005-01-14  4:32                   ` Evgeniy Polyakov
2005-01-19 22:54                     ` Greg KH
2005-01-13 13:56               ` Kernel conector. Reincarnation #2. GPL issues Evgeniy Polyakov
     [not found]           ` <20041225180241.38ffb9d8@zanzibar.2ka.mipt.ru>
     [not found]             ` <20050104060211.50c2bf47@zanzibar.2ka.mipt.ru>
     [not found]               ` <20050112190615.GC10885@kroah.com>
2005-01-12 22:15                 ` kobject_uevent.c moved to kernel connector Evgeniy Polyakov
2005-01-19 23:05                   ` Greg KH
2005-01-20  8:48                     ` Evgeniy Polyakov
2005-01-20 17:47                       ` Greg KH

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=29495f1d050113095856d998ea@mail.gmail.com \
    --to=nish.aravamudan@gmail.com \
    --cc=greg@kroah.com \
    --cc=johnpol@2ka.mipt.ru \
    --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