Commit Graph

26 Commits

Author SHA1 Message Date
Dominique Martinet
516ab87ab9 Copyrights: fujitsu 2018 bump
Separate copyright bumps in a different commit.
A lot of files only had the copyright change at this point; these
were probably changes I added separatly in other patches but just
split these in a different commit instead to simplify git stats

Change-Id: I93cf3fc1c0fa04ee743a79c3fe9768933e6bd0d2
2019-02-01 13:18:52 +09:00
Dominique Martinet
39f9d7fdff Handle hugetlbfs file mapping
Hugetlbfs file mappings are handled differently than regular files:
 - pager_req_create will tell us the file is in a hugetlbfs
 - allocate memory upfront, we need to fail if not enough memory
 - the memory needs to be given again if another process maps the same
   file

This implementation still has some hacks, in particular, the memory
needs to be freed when all mappings are done and the file has been
deleted/closed by all processes.
We cannot know when the file is closed/unlinked easily, so clean up
memory when all processes have exited.

To test, install libhugetlbfs and link a program with the additional
LDFLAGS += -B /usr/share/libhugetlbfs -Wl,--hugetlbfs-align

Then run with HUGETLB_ELFMAP=RW set, you can check this works with
HUGETLB_DEBUG=1 HUGETLB_VERBOSE=2

Change-Id: I327920ff06efd82e91b319b27319f41912169af1
2018-10-11 08:54:13 +00:00
Dominique Martinet
bc3e6ded65 disable sse for everyone
GCC optimizes big switches with sse so we could clobber users floating
point registers when they would do a syscall

Reproducer:
```
 #include <stdio.h>
 #include <stdlib.h>

 union num {
 	float f;
 	unsigned long long i;
 };

 #define WORKSIZE (1024 * 1024 * 32)

 int main(int argc, char **argv) {
 	char *work = malloc(WORKSIZE);
 	char *fromaddr;
 	char sink;
 	union num r;
 	unsigned long long int offset;

 	r.f = drand48();
 	printf("r: %llx\n", (long long)r.i);
 	offset = (long long int)(r.f * (double)WORKSIZE);
 	fromaddr = work + offset;
 	printf("%e %llx %llx\n", r.f, offset, fromaddr);
 	sink = *fromaddr;

 	return 0;
 }
```

Change-Id: I7bb0883ec8ef2f245ab98064e308025422afc115
2018-07-26 03:26:25 +00:00
Hannes Weisbach
1cb9b435a9 Fix (?) build system
- disable -mno-red-zone for ARM
- add missing INCLUDEDIR
- make gencore.c compile
2017-10-18 09:20:52 +09:00
Balazs Gerofi
43ecf06e83 arch: x86 -> x86_64 and build system changes 2017-10-18 09:20:52 +09:00
Hannes Weisbach
4f2c1e07c1 Add ARCH variable to Makefiles
In some Makefiles the ARCH variable was not set, although it was used.
In executer/user/Makefile.in it was used before it was set.
2017-10-18 09:20:50 +09:00
Dominique Martinet
b894619d1b Speed up parallel builds
- make should be $(MAKE)
 - add + in front of rules spawning long-lasted make process in a
subshell. (This would not be needed with $(MAKE) -C .. target, but our
makefiles do not handle that because they use $(PWD))
 - split the main 'all' rule as all 4 targets are independant
 - fix dependencies where appropriate for parallelism

Extra, not speed-related changes:
 - remove some double-colon for targets as they do not need it

This cuts build time from 5s to 1.5s on a laptop with -j4, and more
importantly from 85s to 35s on a KNL node.
As a bonus, the fixed dependencies removes the need to clean before
rebuilding all the time. Probably.
2017-10-13 10:02:11 +09:00
Takayuki Okamoto
325082a571 adapt "out of tree build" for arm64 2017-09-11 15:29:53 +09:00
Takayuki Okamoto
0278a876db disable POSTK_DEBUG_* on x86_64 2017-09-07 22:20:22 +09:00
Takayuki Okamoto
9989f41fd3 add arm64 support
- add arm64 dependent codes with GICv3 and SVE support
- fix bugs based on architecture separation requests
2017-09-05 15:06:27 +09:00
Yutaka Ishikawa
236a072311 Add qlmpi and swap to mckernel (This is rebase commit for merging to development) 2017-08-29 15:04:58 +09:00
Tomoki Shirasawa
d7b8e7f4f4 fix to count user pages
refs #864
2017-07-14 09:51:39 +09:00
Balazs Gerofi
5cdd194856 Port Linux red-black trees 2017-07-08 18:12:01 +09:00
Balazs Gerofi
2afc9d37d1 fix config.h inclusion 2017-06-17 07:05:33 +09:00
Masamichi Takagi
b527503937 Fix rusage 2017-06-07 15:15:20 +09:00
Masamichi Takagi
6bdafbd33b Fix rusage 2017-06-07 09:30:42 +09:00
Balazs Gerofi
e2f424846c profile: rewrite syscall tracker for generic profiling code 2017-05-23 02:42:05 +09:00
Katsukura
8c9b207557 configure : add option --enable-rusage 2017-04-27 14:00:59 +09:00
Katsukura
3fe2257929 create rusage branch. 2017-03-15 23:22:51 +09:00
Yoichi Umezawa
f410af1cfc xpmem: porting xpmem v2.6.3
implement xpmem_make, xpmem_remove
2016-12-16 17:00:09 +09:00
Tomoki Shirasawa
a1035a1878 fix out of tree build 2016-12-01 12:55:34 +09:00
Ken Sato
1130cafe41 ptrace: fixed for threads. 2016-11-28 11:19:30 +09:00
Tomoki Shirasawa
bf0cf0a346 fix REQ-31 2016-03-08 15:19:03 +09:00
NAKAMURA Gou
8cb72df663 support McKernel's sysfs tree 2015-12-16 13:42:30 +09:00
NAKAMURA Gou
a0d909af75 add supports for dump analyzer 2015-03-31 12:59:53 +09:00
bgerofi@riken.jp
658ff759ef build scripts: support for separate build and source directories 2014-10-20 18:27:24 +09:00