mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hillf Danton <dhillf@gmail.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v0] add nano semaphore in kernel
Date: Tue, 28 Dec 2010 21:13:19 +0800	[thread overview]
Message-ID: <AANLkTimG6EPdy+crpxc_HDzAMd-4WCaivsTMiQkiFFns@mail.gmail.com> (raw)
In-Reply-To: <201012272215.52642.arnd@arndb.de>

On Tue, Dec 28, 2010 at 5:15 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Sunday 26 December 2010, Hillf Danton wrote:
>>
>> Based upon high resolution timer and idea borrowed from semaphore,
>> nano semaphore is created.
>>
>> Nano semaphore provides finer time resolution depending on system
>> configuration and capabilities.
>>
>> Nano semaphore is not to replace semaphore, but used in application
>> environments where nano seconds are required.
>>
>> Three methods, nano_semaphore_try_down, nano_semaphore_down and
>> nano_semaphore_up are implemented in a header file, and there is no
>> corresponding C file since nano semaphore is not complex.
>>
>> Signed-off-by: Hillf Danton <dhillf@gmail.com>
>
> There are very few users of real semaphores today, and we're trying to
> get rid of them. It's not clear what your requirements are, since you
> have not posted any new users of this, but instead of adding more

I want to add new way to do semaphore with finer time resolution,
without considering much about its potential usage.

And I learn from your comments there is more to do, thanks.

> locking primitives, I would recommend changing one of the existing
> ones (mutex, semaphore, rwsem) to have nanosecond timeouts instead
> of jiffies.
>
> The easiest way would certainly be to change the three users of
> down_timeout() to use nanoseconds.
>

I will try the three instances of down_timeout() soon.

Thanks
Hillf

  reply	other threads:[~2010-12-28 13:13 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-26  5:13 Hillf Danton
2010-12-26  6:46 ` Rakib Mullick
2010-12-26  7:04   ` Hillf Danton
2010-12-26  9:08     ` Rakib Mullick
2010-12-26 12:05       ` Hillf Danton
2010-12-26 12:56         ` Rakib Mullick
2010-12-27 14:04           ` Hillf Danton
2010-12-27 20:08 ` Randy Dunlap
2010-12-29 14:57   ` Hillf Danton
2010-12-27 21:15 ` Arnd Bergmann
2010-12-28 13:13   ` Hillf Danton [this message]
2010-12-28 15:51   ` Daniel Walker
2010-12-29 11:47     ` Arnd Bergmann
2010-12-29 14:42       ` Hillf Danton
2010-12-29 14:58         ` Daniel Walker
2010-12-29 15:03           ` Hillf Danton
2010-12-29 19:16         ` Arnd Bergmann
2010-12-30 14:21           ` Hillf Danton
2010-12-30 15:56             ` Arnd Bergmann
2011-01-04 14:03 ` Pavel Machek
2011-01-04 14:18   ` Hillf Danton

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=AANLkTimG6EPdy+crpxc_HDzAMd-4WCaivsTMiQkiFFns@mail.gmail.com \
    --to=dhillf@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    /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®