mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kosaki.motohiro@jp.fujitsu.com, Bryan Donlan <bdonlan@gmail.com>,
	linux-kernel@vger.kernel.org, Ulrich Drepper <drepper@redhat.com>,
	linux-api@vger.kernel.org, Timo Sirainen <tss@iki.fi>
Subject: Re: [resend][PATCH] Added PR_SET_PROCTITLE_AREA option for prctl()
Date: Tue, 13 Oct 2009 09:03:22 +0900 (JST)	[thread overview]
Message-ID: <20091013083744.C747.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <20091012122246.a941013b.akpm@linux-foundation.org>

> On Tue, 13 Oct 2009 04:03:45 +0900 (JST)
> KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> wrote:
> 
> > > Start simple.  What's wrong with mutex_lock() on the reader and writer
> > > sides?  rwsems might be OK too.
> > > 
> > > In both cases we should think about whether persistent readers can
> > > block the writer excessively though.
> > 
> > I thought your mention seems reasonable. then I mesured various locking
> > performance.
> > 
> > 		no-contention	read-read contetion	read-write contention
> > w/o patch	4627 ms		 7575 ms		 N/A
> > mutex		5717 ms		33872 ms (!)		14793 ms
> > rw-semaphoe	6846 ms		10734 ms		36156 ms (!)
> > seqlock		4754 ms		 7558 ms		 9373 ms
> > 
> > Umm, seqlock is significantly better than other.
> 
> Sure, but even the worst case there is 1,000,000 operations in 34
> seconds (yes?). 33 microseconds for a /proc read while under a specific
> local DoS attack is OK!
> 
> If so then all implementations are acceptable and we should choose the
> simplest, most-obviously-correct one.

Hm, ok!

I had guessed you don't accept this slowness. but my guess was wrong.
I have no objection to use rw-semaphoe if you accept it. 



  reply	other threads:[~2009-10-13  0:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-09  4:50 KOSAKI Motohiro
2009-10-10  0:13 ` Andrew Morton
2009-10-10  2:22   ` Bryan Donlan
2009-10-10  2:42     ` Andrew Morton
2009-10-10  2:57       ` Bryan Donlan
2009-10-10  6:32         ` KOSAKI Motohiro
2009-10-10  6:39           ` Andrew Morton
2009-10-12 19:03             ` KOSAKI Motohiro
2009-10-12 19:22               ` Andrew Morton
2009-10-13  0:03                 ` KOSAKI Motohiro [this message]
2009-10-10  7:11           ` Bryan Donlan
2009-10-12 19:03             ` KOSAKI Motohiro
2009-10-12 19:33               ` Bryan Donlan

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=20091013083744.C747.A69D9226@jp.fujitsu.com \
    --to=kosaki.motohiro@jp.fujitsu.com \
    --cc=akpm@linux-foundation.org \
    --cc=bdonlan@gmail.com \
    --cc=drepper@redhat.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tss@iki.fi \
    /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®