Commit Graph

29 Commits

Author SHA1 Message Date
Dominique Martinet
13e71ac9dc pager: minor cleanups
- remove unused MF_END (that only makes sense for enums without holes,
  this one is a set of bits masks)
- remove useless goto in pager_req_create()
- init maxprot to 0 from the start, it's not used in the error cases
  (except for debug print)

Change-Id: Ic56c0754824b99f8a7e45fa8e99b8fe3e7c7e592
2018-10-11 08:54:13 +00:00
Dominique Martinet
c25fb2aa39 memobj: transform memobj lock to refcounting
We had a deadlock between:
 - free_process_memory_range (take lock) -> ihk_mc_pt_free_range ->
... -> remote_flush_tlb_array_cpumask -> "/* Wait for all cores */"
and
 - obj_list_lookup() under fileobj_list_lock that disabled irqs
and thus never ack'd the remote flush

The rework is quite big but removes the need for the big lock,
although devobj and shmobj needed a new smaller lock to be
introduced - the new locks are used much more locally and
should not cause problems.

On the bright side, refcounting being moved to memobj level means
we could remove refcounting implemented separately in all object
types and simplifies code a bit.

Change-Id: I6bc8438a98b1d8edddc91c4ac33c11b88e097ebb
2018-09-12 18:03:25 +09:00
Balazs Gerofi
f3d18eb9de fileobj/devobj: record path name (originally by Takagi-san) 2018-05-14 17:46:52 +09:00
Katsuya Horigome
d649d6fc2d Include mbind support (this is a rebase commit to merge into development) 2017-11-27 11:16:53 +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
Masamichi Takagi
74f15783d2 ihk_os_getrusage(): Add per-page-size memory usage accounting 2017-08-17 12:49:34 +09:00
Balazs Gerofi
9b5ccb5a33 Pre-map file mappings from /dev/shm (--mpol-shm-premap mcexec argument) 2017-05-23 20:00:06 +09:00
Tomoki Shirasawa
e936b2ebe1 memobj_release: don't call syscall_generic_forwarding after process termination
refs #816
2017-03-10 12:58:47 +09:00
Balazs Gerofi
1ff0afe6fb devobj/fileobj: do not try to free memory for device file mappings 2017-01-08 14:16:10 +09:00
Balazs Gerofi
9635a628a9 fileobj/shmobj/devobj: add file size to memobj 2016-12-19 12:55:12 +09:00
Balazs Gerofi
ff37ff9ccf memobj: synch prefetch among processes 2016-12-18 21:12:38 +09:00
Balazs Gerofi
bce10e11e4 fileobj: rewrite for scalability using per-file page hash 2016-12-18 21:12:37 +09:00
Balazs Gerofi
648bacc90f device file mappings: communicate map flags and fault missing translations 2016-06-24 12:44:59 -07:00
Balazs Gerofi
a83ad620c8 devobj: allow read only device file mappings (OFED 3.3 support) 2016-06-21 06:57:59 +09:00
NAKAMURA Gou
fbd9dc878b memobj: add lookup_page method 2016-03-23 19:14:28 +09:00
NAKAMURA Gou
0b07dd1b79 support madvise(MADV_REMOVE) partially
This MADV_REMOVE works with a mapping which is
- created with shmat() and
- not sharing memobj with other mappings.
2015-10-28 18:41:28 +09:00
NAKAMURA Gou
4698bc40c2 implement System V shared memory for LTP syscalls 2015-03-19 16:21:18 +09:00
Balazs Gerofi
bf12a5c45e Introduction of write-combined memory type mappings.
Introduction of VR_WRITE_COMBINED, PTATTR_WRITE_COMBINED and modification
to the memobj's get_page() interface so that Linux communicates back mapping
flags (such as write-combined).
2015-03-05 16:03:21 +09:00
NAKAMURA Gou
16af976a71 support msync() system call. refs #382
Msync(2) of this version writes only the pages which the calling process
modified. Modifications of the other processes are not written.
2015-02-18 11:52:15 +09:00
NAKAMURA Gou
438c7fd784 add devobj a new memobj 2014-09-17 19:48:02 +09:00
NAKAMURA Gou
36cff84e05 add zeroobj for private anonymous mappings 2014-07-07 18:11:43 +09:00
NAKAMURA Gou
380fcbda73 add shmobj for shared anonymous mappings 2014-07-07 18:11:40 +09:00
NAKAMURA Gou
9057268f0e add memobj's default action 2014-07-07 18:11:38 +09:00
NAKAMURA Gou
9efb5e4fc5 add memobj_has_pager() 2014-07-07 18:11:36 +09:00
NAKAMURA Gou
03521e9c2c add copyrights 2013-11-14 16:49:40 +09:00
NAKAMURA Gou
bbbc6e1570 add shared mapped file (in progress)
implemented:
- Pages can be shared between maps.
- A change made to a map is written to the file, at munmap().

not yet implemented:
- VM operation during page IO execution.
  Because page IO is executed with VM's lock.
- Page IO, which does not change a file size with any case.
  When munmap() races with truncate(), the file size may be changed
  illegally.
2013-11-11 18:18:33 +09:00
NAKAMURA Gou
27172ad413 support private mapped file 2013-10-15 12:30:41 +09:00
NAKAMURA Gou
78d9d3fcd2 Revert "trial implementation of private file mapping"
This reverts commit abe57218c4.
2013-07-26 16:44:39 +09:00
NAKAMURA Gou
abe57218c4 trial implementation of private file mapping
for review only.  will soon be reverted.
2013-07-26 14:40:12 +09:00