From: Pauli Nieminen <ext-pauli.nieminen@nokia.com>
To: ext Peter Zijlstra <peterz@infradead.org>
Cc: ext Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Tony Lindgren <tony@atomide.com>,
Jarkko Nikula <jhnikula@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Pauli <suokkos@gmail.com>
Subject: Re: IPC between application and xserver is causing extra context switches
Date: Fri, 3 Sep 2010 17:24:32 +0300 [thread overview]
Message-ID: <20100903142432.GG19353@squeeze> (raw)
In-Reply-To: <1283499074.1783.59.camel@laptop>
On 03/09/10 09:31 +0200, ext Peter Zijlstra wrote:
> On Fri, 2010-09-03 at 10:17 +0300, Pauli Nieminen wrote:
> > Scheduling at write is wrong because xserver doesn't know about client
> > priorities.
>
> Waking up the client at write is correct because you don't know if there
> is more to be written.
>
IMO xserver is already signaling kernel when there is nothing more to write.
There is nothing more to write when xserver calls select after processing
request and writing responses.
O_NONBLOCK is set for file descriptors if it matters.
syscalls will be:
select(all_fds);
read(2, ...);
read(5, ...);
writev(3, ...);
writev(5, ...);
writev(6, ...);
select(all_fds);
Of course this is a lot simplified what really happens.
next prev parent reply other threads:[~2010-09-03 14:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-09 15:02 IPC between application and xserver is causing extra context switches Pauli Nieminen
2010-09-01 2:58 ` Mathieu Desnoyers
2010-09-03 7:17 ` Pauli Nieminen
2010-09-03 7:31 ` Peter Zijlstra
2010-09-03 8:06 ` Pauli Nieminen
2010-09-03 14:24 ` Pauli Nieminen [this message]
2010-09-03 15:30 ` Peter Zijlstra
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=20100903142432.GG19353@squeeze \
--to=ext-pauli.nieminen@nokia.com \
--cc=jhnikula@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=peterz@infradead.org \
--cc=suokkos@gmail.com \
--cc=tony@atomide.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