linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ivo Sieben <meltedpianoman@gmail.com>
To: Preeti U Murthy <preeti@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, Andi Kleen <andi@firstfloor.org>,
	Oleg Nesterov <oleg@redhat.com>, Jiri Slaby <jslaby@suse.cz>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	linux-serial@vger.kernel.org, Alan Cox <alan@linux.intel.com>,
	Greg KH <gregkh@linuxfoundation.org>
Subject: Re: [PATCH] tty: Only wakeup the line discipline idle queue when queue is active
Date: Wed, 16 Jan 2013 13:02:51 +0100	[thread overview]
Message-ID: <CAMSQXEHjP5mzs9u5DUmuYgoEceM2OO=E8844-XQ7LPCSECoGRw@mail.gmail.com> (raw)
In-Reply-To: <50F683D9.1080908@linux.vnet.ibm.com>

2013/1/16 Preeti U Murthy <preeti@linux.vnet.ibm.com>:
>
> Yes.Thank you very much for the explanation :) But I dont see how the
> context switching goes away with your patch.With your patch, when the
> higher priority thread comes in when the lower priority thread is
> running in the critical section,it will see the wait queue empty and
> "continue its execution" without now wanting to enter the critical
> section.So this means it will preempt the lower priority thread because
> it is not waiting on a lock anyway.There is a context switch here right?
> I dont see any problem in scheduling due to this,but I do think your
> patch is essential.
>

I don't have a problem that there is a context switch to the high
priority process: it has a higher priority, so it probably is more
important.
My problem is that even when the waitqueue is empty, the high priority
thread has a risk to block on the spinlock needlessly (causing context
switches to low priority task and back to the high priority task)

Regards,
Ivo Sieben

  reply	other threads:[~2013-01-16 12:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-18 14:48 [PATCH] tty: Only wakeup the line discipline idle queue when queue is active Ivo Sieben
2013-01-02  9:29 ` Jiri Slaby
2013-01-02 11:43   ` Alan Cox
2013-01-02 15:21     ` Ivo Sieben
2013-01-02 19:06       ` Jiri Slaby
2013-01-03  9:49         ` Ivo Sieben
2013-01-03 18:36           ` Oleg Nesterov
2013-01-15  9:16             ` Ivo Sieben
2013-01-15 18:03               ` Oleg Nesterov
2013-01-16  8:13           ` Preeti U Murthy
2013-01-16  9:16             ` Ivo Sieben
2013-01-16 10:41               ` Preeti U Murthy
2013-01-16 12:02                 ` Ivo Sieben [this message]
2013-01-17 10:56                   ` Preeti U Murthy
2013-01-18 15:45                     ` Oleg Nesterov
2013-01-21  2:56                       ` Preeti U Murthy
2013-01-21  7:20                       ` Ivo Sieben

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='CAMSQXEHjP5mzs9u5DUmuYgoEceM2OO=E8844-XQ7LPCSECoGRw@mail.gmail.com' \
    --to=meltedpianoman@gmail.com \
    --cc=alan@linux.intel.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andi@firstfloor.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jslaby@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=oleg@redhat.com \
    --cc=peterz@infradead.org \
    --cc=preeti@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).