* [PATCH] worker: rely on F_SETPIPE_SZ to set mininum value
@ 2019-01-05 21:43 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2019-01-05 21:43 UTC (permalink / raw)
To: yahns-public
Old kernels running on alpha may EINVAL, here; but
modern kernels will automatically increase the passed
value to the minimum size supported by the kernel.
This only affects alpha, since all other arches use 4K
page size on Linux.
---
lib/yahns/worker.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/yahns/worker.rb b/lib/yahns/worker.rb
index 1b65e3d..0355629 100644
--- a/lib/yahns/worker.rb
+++ b/lib/yahns/worker.rb
@@ -10,13 +10,13 @@ def initialize(nr)
@nr = nr
@to_io, @wr = Kgio::Pipe.new
- # Seems it's only alpha with a != 4K page size on Linux
begin
# F_SETPIPE_SZ = 1031, PAGE_SIZE = 4096
+ # (fcntl will handle minimum size on platforms where PAGE_SIZE > 4096)
@to_io.fcntl(1031, 4096)
rescue Errno::EINVAL
# old kernel
- end if RUBY_PLATFORM =~ /\blinux\b/ && RUBY_PLATFORM !~ /alpha/
+ end if RUBY_PLATFORM =~ /\blinux\b/
end
def atfork_child
--
EW
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-01-05 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-05 21:43 [PATCH] worker: rely on F_SETPIPE_SZ to set mininum value Eric Wong
yahns Ruby server user/dev discussion
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://yhbt.net/yahns-public
git clone --mirror http://ou63pmih66umazou.onion/yahns-public
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V1 yahns-public yahns-public/ https://yhbt.net/yahns-public \
yahns-public@yhbt.net yahns-public@rubyforge.org
public-inbox-index yahns-public
Example config snippet for mirrors.
Newsgroups are available over NNTP:
nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns
nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.yahns
note: .onion URLs require Tor: https://www.torproject.org/
code repositories for the project(s) associated with this inbox:
../../../yahns.git
AGPL code for this site: git clone http://ou63pmih66umazou.onion/public-inbox.git