ref: b54c61c6174251736e0a6bf30fc1631eca79210c
parent: 06221c080dad6650b1e1af88857951775803bf32
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sat Mar 16 13:10:59 EDT 2024
devpipe: use 256k pipeqsize as default, make sure its a multiple of the i/o unit
--- a/sys/src/9/port/devpipe.c
+++ b/sys/src/9/port/devpipe.c
@@ -39,12 +39,10 @@
static void
pipeinit(void)
{
- if(conf.pipeqsize == 0){
- if(conf.nmach > 1)
- conf.pipeqsize = 256*1024;
- else
- conf.pipeqsize = 32*1024;
- }
+ if(conf.pipeqsize == 0)
+ conf.pipeqsize = 256*1024;
+ /* make pipeqsize a multiple of our i/o unit */
+ conf.pipeqsize = qiomaxatomic * ((conf.pipeqsize + qiomaxatomic-1)/qiomaxatomic);
}
/*