mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: "Rakib Mullick" <rakib.mullick@gmail.com>
Cc: "Linux-kernel Mailing List" <linux-kernel@vger.kernel.org>,
	"Ingo Molnar" <mingo@elte.hu>,
	"Andrew Morton" <akpm@linux-foundation.org>
Subject: Re: [PATCH] kernel/freezer.c : Removing extra checking.
Date: Sat, 6 Dec 2008 17:52:57 +0100	[thread overview]
Message-ID: <200812061752.58008.rjw@sisk.pl> (raw)
In-Reply-To: <b9df5fa10812060704t1685710aw65f7c1e00e5f98@mail.gmail.com>

On Saturday, 6 of December 2008, Rakib Mullick wrote:
> On 12/6/08, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > On Saturday, 6 of December 2008, Rakib Mullick wrote:
> >  > Impact: Reduces an extra checking.
> >  >
> >  > Following patch removes an extra checking. We can remove it since, the
> >  > current task is frozen. If the current task is not frozen, then it
> >  > will return from __else__ condition of freezing(current) check. So,
> >  > the check becames unnecessary. It also reduces 32 bytes of text space
> >  > on my x86  (32 bit) system.
> >
> >
> > What will happen with this patch applied when a task is woken up for some
> >  reason other than thawing?
> thawing is usually used for woken up a frozzen process. Would you
> please tell me what are the other ways to woken up a frozzen process?
> Am I missing anything ?

Well, in theory the process can be woken up for another reason.

I don't have any particular examples in mind, but in this case the burden is
yours to show that it won't happen and to say why exactly you think so in the
changelog, because this is the very reason why the code has been written this
way in the first place.

Thanks,
Rafael


> >  > Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
> >  >
> >  > --- linux-2.6-orig/kernel/freezer.c   2008-12-05 19:53:45.000000000 +0600
> >  > +++ linux-2.6/kernel/freezer.c        2008-12-05 19:55:40.000000000 +0600
> >  > @@ -46,8 +46,6 @@ void refrigerator(void)
> >  >
> >  >       for (;;) {
> >  >               set_current_state(TASK_UNINTERRUPTIBLE);
> >  > -             if (!frozen(current))
> >  > -                     break;
> >  >               schedule();
> >  >       }
> >  >       pr_debug("%s left refrigerator\n", current->comm);
> >
> > > --

  reply	other threads:[~2008-12-06 16:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06  8:20 Rakib Mullick
2008-12-06 13:41 ` Rafael J. Wysocki
2008-12-06 15:04   ` Rakib Mullick
2008-12-06 16:52     ` Rafael J. Wysocki [this message]
2008-12-11 12:31       ` Pavel Machek
2008-12-12 15:01         ` Rakib Mullick

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=200812061752.58008.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rakib.mullick@gmail.com \
    /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®