mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mandeep Baines <msb@google.com>
To: mingo@elte.hu, fweisbec@gmail.com, linux-kernel@vger.kernel.org
Cc: rientjes@google.com, mbligh@google.com, thockin@google.com
Subject: Re: [PATCH v3] softlockup: remove hung_task_check_count
Date: Thu, 22 Jan 2009 19:21:09 -0800	[thread overview]
Message-ID: <1fe6c7900901221921m586b129dwf8c3446f897b57f0@mail.gmail.com> (raw)
In-Reply-To: <20090122195513.GA22146@google.com>

On Thu, Jan 22, 2009 at 11:55 AM, Mandeep Singh Baines <msb@google.com> wrote:
>
> The unlock and lock could be removed and only compiled in if PREEMPT.
> If the number of tasks isn't bound, the lock might be held too long.
>

This is incorrect. The adding the lock and unlock will not make the
system more pre-emptive. To be more pre-emptive you'd want to check
need_resched() as often as possible.

> It would be kinda funny if hung_task caused a softlockup.
>

Again. This is incorrect. Rescheduling if need_resched() will prevent
softlockup.

Not sure what I was thinking this morning;)

However, I am happy with the patch. To give writers a chance, the lock
should held for bounded time. Holding the lock in khungtask (which is
running at low scheduler priority) could potentially be delaying
important work. The longer the lock is held, the bigger the priority
inversion problem.

  reply	other threads:[~2009-01-23  3:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21  1:46 [PATCH] " Mandeep Singh Baines
2009-01-21 11:13 ` Ingo Molnar
2009-01-21 13:14   ` Frédéric Weisbecker
2009-01-22  0:54   ` [PATCH v2] " Mandeep Singh Baines
2009-01-22  8:34     ` Ingo Molnar
2009-01-22 19:55       ` [PATCH v3] " Mandeep Singh Baines
2009-01-23  3:21         ` Mandeep Baines [this message]
2009-01-23  9:23           ` Ingo Molnar
2009-01-23 10:04             ` Frédéric Weisbecker
2009-01-24  1:55               ` Mandeep Singh Baines
2009-01-24 15:52                 ` Frederic Weisbecker
2009-01-26  2:25                   ` Mandeep Baines
2009-01-24  2:56             ` Mandeep Singh Baines

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=1fe6c7900901221921m586b129dwf8c3446f897b57f0@mail.gmail.com \
    --to=msb@google.com \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@google.com \
    --cc=mingo@elte.hu \
    --cc=rientjes@google.com \
    --cc=thockin@google.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®