9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* Re: [9fans] "Blocks" in C
@ 2009-09-18 15:50 drivers
  2009-09-18 15:56 ` erik quanstrom
  0 siblings, 1 reply; 117+ messages in thread
From: drivers @ 2009-09-18 15:50 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

     Is there some method of lock profiling on plan9?  For example when I do work on freebsd and say remove a giant lock from the keyboard subsystem; I run the lock profiler before and after the change to see how long the system was sitting at the in kernel locks.  
     I am doing my thesis (undergrad) on these kind of topics and am interested in seeing how I may be of use.

=jt
------Original Message------
From: erik quanstrom
Sender: 9fans-bounces@9fans.net
To: 9fans@9fans.net
ReplyTo: Fans of the OS Plan 9 from Bell Labs
Subject: Re: [9fans] "Blocks" in C
Sent: Sep 18, 2009 07:41

> it isn't really a `big kernel lock' in the linux sense.

you're right, technically it is a very different problem.

the effects seem similar.  the lock is just in the block allocator
rather than the syscall interface.  if you're doing a lot of i/o
in a standard kernel, there's a lot of block allocation.

> with error checking. an alternative allocator that uses quickfit on top of
> a variant of the simple allocator in kernighan and ritchie is
> roughly 30 times faster on some malloc-thrashing tests (i'm just remembering that
> from tests i did last year, so i might have the number wrong, but it's substantial).

i see the same thing.  with the allocator in a specific packet-pushing
test, i see 185000 packets/s, with a block pool i see ~450000 packets/s.
all the packets are the same size.

would you be willing to share your allocator?  this may help a number
of cases i'm currently fighting.  10gbe and 2×10gbe + quad processors
have a way of putting a sharp point on an otherwise dull problem.

i also wonder if an ilock is really the right protection
mechanism on machines with 8 or 16 logical processors
for malloc.

the reason i mention this is that it turns out that the lock
on block pools can be hot enough that splitting the lock
per controller can have a big positive effect.  i need to set
up a faster target, but i've seen significant jumps in bandwidth
for 2 82563 controllers when using 2 pools instead of one
even on a fairly bored machine.

sorry for the lack of real numbers.

- erik



=jt

^ permalink raw reply	[flat|nested] 117+ messages in thread
* [9fans] "Blocks" in C
@ 2009-09-17  9:19 Andrew Simmons
  2009-09-17 14:45 ` LiteStar numnums
  2009-09-17 17:24 ` Daniel Lyons
  0 siblings, 2 replies; 117+ messages in thread
From: Andrew Simmons @ 2009-09-17  9:19 UTC (permalink / raw)
  To: 9fans

>> we'd have been much better off if Apple had instead spent the
>> time and effort writing a decent iTunes

And no doubt we'd have been much better off if Apple had instead spent the
time and effort making a decent iPod.

The iTunes on my computer strikes me as at worst perfectly decent, in
general outstandingly good. What do you feel a decent iTunes should
look like?



^ permalink raw reply	[flat|nested] 117+ messages in thread
* Re: [9fans] "Blocks" in C
@ 2009-09-04  1:35 drivers
  2009-09-04  1:52 ` erik quanstrom
  0 siblings, 1 reply; 117+ messages in thread
From: drivers @ 2009-09-04  1:35 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

To ensure only one thread in the kernel at a time?

-jt-
------Original Message------
From: erik quanstrom
Sender: 9fans-bounces@9fans.net
To: 9fans@9fans.net
ReplyTo: Fans of the OS Plan 9 from Bell Labs
Subject: Re: [9fans] "Blocks" in C
Sent: Sep 3, 2009 21:32

> what does BLK stand for?

big kernel lock.

- erik



=jt



^ permalink raw reply	[flat|nested] 117+ messages in thread
* [9fans] "Blocks" in C
@ 2009-09-02  8:04 Anant Narayanan
  2009-09-02  9:43 ` Francisco J Ballesteros
                   ` (5 more replies)
  0 siblings, 6 replies; 117+ messages in thread
From: Anant Narayanan @ 2009-09-02  8:04 UTC (permalink / raw)
  To: 9fans

Mac OS 10.6 introduced a new C compiler frontend (clang), which added
support for "blocks" in C [1]. Blocks basically add closures and
anonymous functions to C (and it's derivatives). Full details with
examples are in the linked article. I think the feature is quite
elegant and might be useful in cases where you want map/reduce like
functionality in C.

How much effort would it be to support a feature similar to blocks in
8c (and family)? What are your thoughts on the idea in general?

--
Anant

[1] http://arstechnica.com/apple/reviews/2009/08/mac-os-x-10-6.ars/10



^ permalink raw reply	[flat|nested] 117+ messages in thread

end of thread, other threads:[~2009-09-18 15:56 UTC | newest]

Thread overview: 117+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-18 15:50 [9fans] "Blocks" in C drivers
2009-09-18 15:56 ` erik quanstrom
  -- strict thread matches above, loose matches on Subject: below --
2009-09-17  9:19 Andrew Simmons
2009-09-17 14:45 ` LiteStar numnums
2009-09-17 17:24 ` Daniel Lyons
2009-09-04  1:35 drivers
2009-09-04  1:52 ` erik quanstrom
2009-09-02  8:04 Anant Narayanan
2009-09-02  9:43 ` Francisco J Ballesteros
2009-09-02 11:00   ` Philippe Anel
2009-09-02 11:13   ` Charles Forsyth
2009-09-03  9:52   ` Greg Comeau
2009-09-02 11:40 ` Eris Discordia
2009-09-02 12:32 ` Uriel
2009-09-02 14:20   ` Devon H. O'Dell
2009-09-03  9:52     ` Greg Comeau
2009-09-03 10:48       ` Akshat Kumar
2009-09-03 11:25         ` Charles Forsyth
2009-09-03 13:59         ` Greg Comeau
2009-09-03 15:15     ` Uriel
2009-09-03 15:44       ` David Leimbach
2009-09-03 16:01         ` Roman V Shaposhnik
2009-09-04  9:15           ` Greg Comeau
2009-09-04 16:49             ` Roman Shaposhnik
2009-09-03 16:02         ` erik quanstrom
2009-09-03 18:56           ` David Leimbach
2009-09-03 18:58             ` erik quanstrom
2009-09-03 19:13               ` David Leimbach
2009-09-03 19:36                 ` erik quanstrom
2009-09-03 19:50                   ` David Leimbach
2009-09-03 20:30                     ` Iruata Souza
2009-09-06 22:35                     ` Uriel
2009-09-07  0:41                       ` David Leimbach
2009-09-03 21:08                   ` Roman V Shaposhnik
2009-09-03 21:35                     ` erik quanstrom
2009-09-03 21:45                       ` David Leimbach
2009-09-03 21:49                         ` David Leimbach
2009-09-03 21:51                           ` David Leimbach
2009-09-03 22:36                       ` Roman V Shaposhnik
2009-09-04  9:16               ` Greg Comeau
2009-09-03 22:10           ` Daniel Lyons
2009-09-03 22:07         ` Daniel Lyons
2009-09-04  9:15         ` Greg Comeau
2009-09-04  3:21       ` Anant Narayanan
2009-09-04  3:52         ` erik quanstrom
2009-09-04  4:18           ` David Leimbach
2009-09-04  4:44             ` erik quanstrom
2009-09-04  5:31               ` David Leimbach
2009-09-04  5:35                 ` David Leimbach
2009-09-04  7:11                   ` Bakul Shah
2009-09-04  7:47                     ` David Leimbach
2009-09-04 14:41                       ` Bakul Shah
2009-09-04 15:04                         ` David Leimbach
2009-09-04 15:58                           ` Bakul Shah
2009-09-04 12:14                     ` erik quanstrom
2009-09-04 13:52                       ` David Leimbach
2009-09-04 13:59                         ` matt
2009-09-04 14:20                         ` erik quanstrom
2009-09-04 14:56                           ` David Leimbach
2009-09-06 23:03                             ` Uriel
2009-09-07  0:45                               ` David Leimbach
2009-09-04 16:50                       ` Roman Shaposhnik
2009-09-04  6:45               ` Bakul Shah
2009-09-04 16:44           ` Roman Shaposhnik
2009-09-04 16:58             ` Iruata Souza
2009-09-04 17:09               ` Roman Shaposhnik
2009-09-04 17:42             ` erik quanstrom
2009-09-04 18:34               ` erik quanstrom
2009-09-04 21:54               ` Roman V Shaposhnik
2009-09-07  9:06             ` Greg Comeau
2009-09-07  9:05         ` Greg Comeau
2009-09-07  9:40           ` Uriel
2009-09-08 15:31             ` David Leimbach
2009-09-08 15:44               ` Uriel
2009-09-08 16:40               ` Bakul Shah
2009-09-11 18:15                 ` Iruata Souza
2009-09-11 18:46                   ` David Leimbach
2009-09-11 20:36                   ` Roman V Shaposhnik
2009-09-11 21:28                     ` David Leimbach
2009-09-14 16:07                       ` Lawrence E. Bakst
2009-09-12 11:08                     ` Anant Narayanan
2009-09-13 19:03                       ` David Leimbach
2009-09-17  1:54                         ` Lawrence E. Bakst
2009-09-17  8:43                           ` Charles Forsyth
2009-09-17  9:12                             ` Daniel Lyons
2009-09-17 15:56                             ` David Leimbach
2009-09-17 17:38                               ` Jack Norton
2009-09-17 20:23                                 ` Anant Narayanan
2009-09-17 20:26                                   ` erik quanstrom
2009-09-17 20:31                                     ` Anant Narayanan
2009-09-17 20:47                                       ` Akshat Kumar
2009-09-17 21:02                                         ` erik quanstrom
2009-09-17 22:26                                           ` Steve Simon
2009-09-17 22:32                                           ` Roman V Shaposhnik
2009-09-18  2:05                                             ` Daniel Lyons
2009-09-18  9:30                                             ` Charles Forsyth
2009-09-18 11:41                                               ` erik quanstrom
2009-09-17 21:03                                       ` Uriel
2009-09-03  9:52   ` Greg Comeau
2009-09-02 14:08 ` Rodolfo (kix)
2009-09-03  9:52   ` Greg Comeau
     [not found] ` <C56117D7BD9A097270529AAE@192.168.1.2>
2009-09-02 15:07   ` David Leimbach
2009-09-02 15:26     ` Roman V Shaposhnik
2009-09-02 15:45       ` David Leimbach
2009-09-03 15:32     ` Uriel
2009-09-03 15:49       ` Roman V Shaposhnik
2009-09-03 15:54         ` erik quanstrom
2009-09-03 16:20           ` Roman V Shaposhnik
2009-09-03 16:44             ` erik quanstrom
2009-09-04  1:05               ` Roman V Shaposhnik
2009-09-04  1:30               ` Russ Cox
2009-09-04  1:32                 ` erik quanstrom
2009-09-03 21:54             ` James Tomaschke
2009-09-06 22:26           ` Uriel
2009-09-04  9:04       ` Greg Comeau
2009-09-02 15:20 ` Roman V Shaposhnik
2009-09-02 17:51   ` Bakul Shah

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).