Changeset View
Standalone View
sys/sys/param.h
Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | |||||
#ifndef BLKDEV_IOSIZE | #ifndef BLKDEV_IOSIZE | ||||
#define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */ | #define BLKDEV_IOSIZE PAGE_SIZE /* default block device I/O size */ | ||||
#endif | #endif | ||||
#ifndef DFLTPHYS | #ifndef DFLTPHYS | ||||
#define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */ | #define DFLTPHYS (64 * 1024) /* default max raw I/O transfer size */ | ||||
#endif | #endif | ||||
#ifndef MAXPHYS | #ifndef MAXPHYS | ||||
#define MAXPHYS (128 * 1024) /* max raw I/O transfer size */ | #define MAXPHYS (1024 * 1024) /* max raw I/O transfer size */ | ||||
#endif | #endif | ||||
mav: If MAXPHYS is left here for some time for some driver compatibility, I think it would be right… | |||||
Done Inline ActionsIt cannot be done this way because sys/param.h is also used by userspace. For sbp(4), can you please point to the full file path and line where MAXPHYS is left ? kib: It cannot be done this way because sys/param.h is also used by userspace.
In fact I wanted to… | |||||
Done Inline ActionsAccording to my sources I see two: mav: According to my sources I see two:
sys/dev/firewire/sbp.c:74… | |||||
Done Inline ActionsI see how I missed them, thanks. kib: I see how I missed them, thanks. | |||||
Done Inline ActionsCould we use #define MAXPHYS __get_maxphys() for userland? Or does this need to be a compile time constant for userland? imp: Could we use #define MAXPHYS __get_maxphys() for userland? Or does this need to be a compile… | |||||
Done Inline ActionsNo we cannot do a trick with __get_maxphys(), it should be constant. I do not see an issue with having it this way. If filesystems or drivers want to inform userspace about proper transfer sizes, there are already channels to communicate that, e.g. statfs(2). kib: No we cannot do a trick with __get_maxphys(), it should be constant. I do not see an issue… | |||||
Done Inline ActionsOK. It might make sense, then, to see what we're using it for in userland. Most places a compile-time thing would be fine, but there's at least two places that use MAXPHYS to size an array... There's a number of places that use it to scale buffers for performance reasons, but others that use it to limit kernel requests.... Clearly beyond the scope of this work, though.... imp: OK. It might make sense, then, to see what we're using it for in userland. Most places a… | |||||
#ifndef MAXDUMPPGS | #ifndef MAXDUMPPGS | ||||
#define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE) | #define MAXDUMPPGS (DFLTPHYS/PAGE_SIZE) | ||||
#endif | #endif | ||||
/* | /* | ||||
* Constants related to network buffer management. | * Constants related to network buffer management. | ||||
* MCLBYTES must be no larger than PAGE_SIZE. | * MCLBYTES must be no larger than PAGE_SIZE. | ||||
*/ | */ | ||||
▲ Show 20 Lines • Show All 198 Lines • Show Last 20 Lines |
If MAXPHYS is left here for some time for some driver compatibility, I think it would be right to include opt_maxphys.h here too. I was surprised how sbp(4) driver builds while still having MAXPHYS, remember that you've moved the option to separate header.