raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] raindrops 0.11.0 - minor fixes improvements
@ 2013-04-20 23:14  6% Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2013-04-20 23:14 UTC (permalink / raw)
  To: raindrops

Changes:

Eric Wong (7):
      raindrops: favor configured processor count over online count
      watcher: set Content-Type via assignment
      Linux::TCP_Info: implement #get! instance method
      linux_inet_diag: avoid unnecessary sockaddr initialization
      .gitignore: add .rbx
      switch back to gemspec development dependencies
      linux_inet_diag: better align listener_stats struct

Lawrence Pit (1):
      Watcher: Use relative paths in HTML links

* http://raindrops.bogomips.org/
* raindrops@librelist.org
* git://bogomips.org/raindrops.git
* http://raindrops.bogomips.org/NEWS.atom.xml

-- 
Eric Wong


^ permalink raw reply	[relevance 6%]

* Re: [PATCH 1/3] raindrops: favor configured processor count over online count
  2013-04-11 23:28  6% [PATCH 1/3] raindrops: favor configured processor count over online count Eric Wong
@ 2013-04-11 23:30  7% ` Eric Wong
  0 siblings, 0 replies; 3+ results
From: Eric Wong @ 2013-04-11 23:30 UTC (permalink / raw)
  To: raindrops

These are all unrelated changes, I'll push this latest series to
"master" unless there are any objections in a few days.

It looks like I forgot to release a new version for a while, so
a new one will probably come very soon (poke me if I forget again :x).


^ permalink raw reply	[relevance 7%]

* [PATCH 1/3] raindrops: favor configured processor count over online count
@ 2013-04-11 23:28  6% Eric Wong
  2013-04-11 23:30  7% ` Eric Wong
  0 siblings, 1 reply; 3+ results
From: Eric Wong @ 2013-04-11 23:28 UTC (permalink / raw)
  To: raindrops

The runnable CPUs of a process may change over the lifetime of
the process.  So favor the count of configured processor count
since that is more likely to be stable.

We do not currently do not have special handling for
hot-plugging/removal of CPUs on systems that may load raindrops
in a single CPU state.
---
 ext/raindrops/raindrops.c | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/ext/raindrops/raindrops.c b/ext/raindrops/raindrops.c
index 6cc0d12..65c16e7 100644
--- a/ext/raindrops/raindrops.c
+++ b/ext/raindrops/raindrops.c
@@ -326,11 +326,13 @@ void Init_raindrops_linux_inet_diag(void);
 void Init_raindrops_linux_tcp_info(void);
 #endif
 
-#ifndef _SC_NPROCESSORS_ONLN
-#  ifdef _SC_NPROC_ONLN
-#    define _SC_NPROCESSORS_ONLN _SC_NPROC_ONLN
+#ifndef _SC_NPROCESSORS_CONF
+#  if defined _SC_NPROCESSORS_ONLN
+#    define _SC_NPROCESSORS_CONF _SC_NPROCESSORS_ONLN
+#  elif defined _SC_NPROC_ONLN
+#    define _SC_NPROCESSORS_CONF _SC_NPROC_ONLN
 #  elif defined _SC_CRAY_NCPU
-#    define _SC_NPROCESSORS_ONLN _SC_CRAY_NCPU
+#    define _SC_NPROCESSORS_CONF _SC_CRAY_NCPU
 #  endif
 #endif
 
@@ -359,8 +361,8 @@ void Init_raindrops_ext(void)
 	VALUE cRaindrops = rb_define_class("Raindrops", rb_cObject);
 	long tmp = 2;
 
-#ifdef _SC_NPROCESSORS_ONLN
-	tmp = sysconf(_SC_NPROCESSORS_ONLN);
+#ifdef _SC_NPROCESSORS_CONF
+	tmp = sysconf(_SC_NPROCESSORS_CONF);
 #endif
 	/* no point in padding on single CPU machines */
 	if (tmp == 1)
-- 
1.8.2.279.g631bc94



^ permalink raw reply related	[relevance 6%]

Results 1-3 of 3 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2013-04-11 23:28  6% [PATCH 1/3] raindrops: favor configured processor count over online count Eric Wong
2013-04-11 23:30  7% ` Eric Wong
2013-04-20 23:14  6% [ANN] raindrops 0.11.0 - minor fixes improvements Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/raindrops.git/

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 read-only IMAP folder(s) and NNTP newsgroup(s).