Comments (20)
Hmm. I don’t have access to a system running kfreebsd. But POSIX_FADV_DONTNEED
should be defined in /usr/include/fcntl.h
or one of the files it includes…
from nocache.
See the source of kfreebsd-9_9.0-11/sys/sys/fcntl.h:
/*
* XXX missing posix_fadvise() and POSIX_FADV_* macros.
*/
What is to be done?
from nocache.
Hi there,
It should be mentioned:
. kfreebsd isn't up to date regarding the /sys/fcntl.h -> kfreebsd folks should update their file.
. freebsd is up to date as shown here: http://fxr.watson.org/fxr/source/sys/fcntl.h
The question is: does (k)FreeBSD support posix_fadvise() correctly? does it behave like Linux's implementation?
As I recall, the nocache implementation includes a workaround for some unavailable features in the Linux kernel?
cheers,
Reda
from nocache.
As I recall, the nocache implementation includes a workaround for some unavailable features in the Linux kernel?
Not really. I just had to split the posix_fadvise
stuff off to another file, because:
/* Since open() and close() are re-defined in nocache.c, it's not
* possible to include <fcntl.h> there. So we do it here. */
from nocache.
ha, good to know.
This should fix things inside cachedel.c : noushi@4a81dca
#if __POSIX_VISIBLE < 200112
#define POSIX_FADV_NORMAL 0 /* no special treatment */
#define POSIX_FADV_RANDOM 1 /* expect random page references */
#define POSIX_FADV_SEQUENTIAL 2 /* expect sequential page references */
#define POSIX_FADV_WILLNEED 3 /* will need these pages */
#define POSIX_FADV_DONTNEED 4 /* dont need these pages */
#define POSIX_FADV_NOREUSE 5 /* access data only once */
#endif
from nocache.
Dmitry (@onlyjob), could you retry the builds now?
from nocache.
Yes, just tried it, but now it fails in "fcntl_helpers.c":
fcntl_helpers.c: In function ‘fadv_dontneed’:
fcntl_helpers.c:12:50: error: ‘POSIX_FADV_DONTNEED’ undeclared (first use in this function)
fcntl_helpers.c:12:50: note: each undeclared identifier is reported only once for each function it appears in
fcntl_helpers.c: In function ‘fadv_noreuse’:
fcntl_helpers.c:18:47: error: ‘POSIX_FADV_NOREUSE’ undeclared (first use in this function)
fcntl_helpers.c:19:1: warning: control reaches end of non-void function [-Wreturn-type]
from nocache.
@onlyjob, I included @noushi’s macros in fcntl_helpers.c
, too with commit 543351b. However I feel we will see another warning about missing function prototypes. Can you try again, please? Are there kfreebsd live systems available to test this?
from nocache.
I tested branch "fcntl-posix-fadv" and it built successfully on kfreebsd. However then it hanged on test just after cd t; prove -v .
.
I could eventually expose my own kfreebsd-i386 VM for you but to do this I need time to put all the necessary configuration in place. Unfortunately time is something that I have in very short supply. :)
from nocache.
Never mind. I’ll just install it inside a VM myself. It could take a day, though.
from nocache.
dumb question: does kfreebsd actually honor posix_fadvise() ?!
what about the regular freebsd?
from nocache.
Regular FreeBSD surely supports this. I will install kfreebsd later and test it out.
For reference, the error messages and the build status are always available on the debian buildd page.
from nocache.
So I installed kfreebsd, but already when compiling, I get a warning:
/tmp/cc9oFzFC.o: In function `main':
cachedel.c:(.text+0x1b8): warning: warning: posix_fadvise is not implemented and will always fail
@onlyjob, can you just make it so that the package is not supported in kfreebsd? Because I wouldn’t know how to solve the case of a missing posix_fadvise
function…
from nocache.
Thank you for going so far in pursue of this problem.
As long as "nocache" FTBFS on kfreebsd there will be no package available for that platform. I think the best would be to leave as is so at least we will know if/when kfreebsd implement "posix_fadvise"...
We can ignore kfreebsd for package build but I think I like the above option a bit more. What would you prefer?
from nocache.
I‘m not a Debian developer. I just thought that a FTBFS might hinder the package entering the distribution. If that’s not the case I agree we should probably leave it, clearly marked “broken“.
from nocache.
@noushi, thanks for researching the __POSIX_VISIBLE
thing – but like indicated I think I will discard this commit, if that’s okay with you.
from nocache.
Hi Julius, Dmitry,
of course, it was mostly a test, so kfreebsd just can't be supported, because it isn't POSIX compliant.
@Feh you should mention this in the README.md .
Ultimately, the package is not broken, and kfreebsd isn't supported.
@onlyjob: you can specify which architectures noncache is to be built for in debian/control, right?
cheers, and thank you both,
Reda
from nocache.
Naturally due to FTBFS package won't be available on broken architecture(s). But build servers will try to build it on every upload and will notify me by email. If it suddenly got fixed I will know. Or if I get annoyed enough with FTBFS emails I can "blacklist" kfreebsd-any to prevent building attempt. I'm not sure what's the best practice in such cases but I reckon it is OK to let it FTBFS.
Thank you very much for checking this issue and sorry for reporting it... Indeed it's should be kfreebsd problem, not yours. I also think it is worth mentioning in README.
from nocache.
Thank you very much for checking this issue and sorry for reporting it... Indeed it's should be kfreebsd problem, not yours.
Not a problem. It is an easy fallacy to believe that only because it works on Linux, it’ll work on any POSIX-compliant UNIX system. So I think it’s better to double-check that what you implemented works correctly than prematurely pointing the finger at others.
from nocache.
kfreebsd is not POSIX compliant!
:-)
from nocache.
Related Issues (20)
- Support O_DIRECT? HOT 1
- Incompatibility with glibc 2.28 HOT 23
- Do SubProcess calls work as expected. HOT 2
- "transmission-gtk" freezes right after downloading because of "nocache" HOT 4
- nocache.c:148: init_mutexes: Assertion `fds_lock != NULL' failed. HOT 3
- nocache makes MC very slow HOT 2
- Doesn't work for pv in conjunction with physical partitions/disks? HOT 3
- GCC cache size flags HOT 3
- Off-by-one issue with NOCACHE_MAX_FDS HOT 6
- Lock pages from preventing of being paged and tune malloc. HOT 1
- Trivial suggestions for README.md
- effect on write cache HOT 1
- Command line parsing issue(s?) causing undefined behaviour HOT 3
- Default Thread limit is not respecting container cpu limit but underline node(vm) HOT 2
- Mention no help for huge files
- unexpected nocache overhead on trivial commands HOT 14
- BUG: pthread_mutex_lock on destroy HOT 3
- nocache works, systemd-run doesn't
- backup still using cache HOT 1
- FTBFS on armhf: symbol `fopen64' is already defined
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nocache.