<feed xmlns='http://www.w3.org/2005/Atom'>
<title>teythoon/hurd.git/libpager, branch master</title>
<subtitle>Personal Hurd development repository</subtitle>
<id>https://darnassus.sceen.net/cgit/teythoon/hurd.git/atom?h=master</id>
<link rel='self' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/'/>
<updated>2016-10-30T20:22:53Z</updated>
<entry>
<title>Mark library stubs as weak</title>
<updated>2016-10-30T20:22:53Z</updated>
<author>
<name>Samuel Thibault</name>
<email>samuel.thibault@ens-lyon.org</email>
</author>
<published>2016-10-30T20:15:47Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=267995f0c2aea8030c6126f62dc41ff63d80caa7'/>
<id>urn:sha1:267995f0c2aea8030c6126f62dc41ff63d80caa7</id>
<content type='text'>
So that static linking of e.g. console.static can work.

* libdiskfs/io-stubs.c (diskfs_S_io_readsleep, diskfs_S_io_eofnotify,
diskfs_S_io_postnotify, diskfs_S_io_readnotify): Mark weak.
* libnetfs/fsstubs.c (netfs_S_file_notice_changes, netfs_S_file_getfh,
netfs_S_ifsock_getsockaddr): Likewise.
* libnetfs/fsysstubs.c (netfs_S_fsys_getfile: netfs_S_fsys_getpriv,
netfs_S_fsys_init, netfs_S_fsys_forward, netfs_S_fsys_startup):
Likewise.
* libpager/stubs.c (_pager_S_memory_object_copy,
_pager_S_memory_object_data_write,
_pager_S_memory_object_supply_completed): Likewise.
* libtrivfs/fsys-stubs.c (trivfs_S_fsys_startup, trivfs_S_fsys_getpriv,
trivfs_S_fsys_init, trivfs_S_fsys_getfile): Likewise.
* libtrivfs/io-stubs.c (trivfs_S_io_map_cntl, trivfs_S_io_get_conch,
trivfs_S_io_release_conch, trivfs_S_io_eofnotify, trivfs_S_io_prenotify,
trivfs_S_io_postnotify, trivfs_S_io_readsleep, trivfs_S_io_sigio,
trivfs_S_io_readnotify): Likewise.
</content>
</entry>
<entry>
<title>libpager: provide 'pager_create_alloc'</title>
<updated>2016-08-07T21:28:45Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@gnupg.org</email>
</author>
<published>2016-05-22T17:35:10Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=0e3a795af98b6441d0a9928036e140978511e272'/>
<id>urn:sha1:0e3a795af98b6441d0a9928036e140978511e272</id>
<content type='text'>
Add a variant to 'pager_create' that allocates memory for the user
hook next to the pager data increasing locality.

* console/pager.c (pager_clear_user_data): Fix type of 'idx', do not
free 'upi'.
(user_pager_create): Use the new function.
* doc/hurd.texi: Document new function.
* ext2fs/pager.c (pager_clear_user_data): Don't free 'upi'.
(diskfs_get_filemap): Use the new function.
* fatfs/pager.c (pager_clear_user_data): Don't free 'upi'.
(diskfs_get_filemap): Use the new function.
* isofs/pager.c (pager_clear_user_data): Don't free 'upi'.
(diskfs_get_filemap): Use the new function.
* libpager/pager-create.c (_pager_create): New generic allocation
function.
(pager_create): Use the new generic function.
(pager_create_alloc): New function.
* libpager/pager.h (pager_create_alloc): New prototype.
</content>
</entry>
<entry>
<title>libpager: add missing include</title>
<updated>2016-04-27T15:35:32Z</updated>
<author>
<name>Justus Winter</name>
<email>justus@gnupg.org</email>
</author>
<published>2016-04-25T16:34:31Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=33536608704a637eb8618396244ed43b9aa6aaf6'/>
<id>urn:sha1:33536608704a637eb8618396244ed43b9aa6aaf6</id>
<content type='text'>
* libpager/demuxer.c: Include &lt;assert.h&gt;.
</content>
</entry>
<entry>
<title>Fix race condition in ext2fs when remounting</title>
<updated>2015-09-06T19:40:20Z</updated>
<author>
<name>James Clarke</name>
<email>jrtc27@jrtc27.com</email>
</author>
<published>2015-08-27T16:22:11Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=7a2c17fcbb789997421725d726340301ef35d84c'/>
<id>urn:sha1:7a2c17fcbb789997421725d726340301ef35d84c</id>
<content type='text'>
On some systems, ext2fs.static would regularly hang at startup, as a
race condition meant it would process paging requests while remounting.
To fix this, libpager has been altered to allow inhibiting and resuming
its worker threads, and ext2fs uses this to inhibit paging while
remounting.

* console/pager.c (pager_requests): New variable.
(user_pager_init): Updated call to pager_start_workers to use new
pager_requests variable.
* daemons/runsystem.sh: Removed artificial delay working around the race
condition.
* ext2fs/ext2fs.c (diskfs_reload_global_state): Call new
inhibit_ext2_pager and resume_ext2_pager functions, and leave sblock as
non-NULL so it will be munmapped.
* ext2fs/ext2fs.h (inhibit_ext2_pager,resume_ext2_pager): New functions.
* ext2fs/pager.c (file_pager_requests): New variable.
(create_disk_pager): Updated call to pager_start_workers to use new
file_pager_requests variable.
(inhibit_ext2_pager,resume_ext2_pager): New functions.
* fatfs/fatfs.h (inhibit_fat_pager,resume_fat_pager): New functions.
* fatfs/pager.c (file_pager_requests): New variable.
(create_fat_pager): Updated call to pager_start_workers to use new
file_pager_requests variable.
(inhibit_fat_pager,resume_fat_pager): New functions.
* libdiskfs/disk-pager.c (diskfs_disk_pager_requests): New variable.
(diskfs_start_disk_pager): Updated call to pager_start_workers to use
new diskfs_disk_pager_requests variable.
* libdiskfs/diskfs-pager.h (diskfs_disk_pager_requests): New variable.
* libpager/demuxer.c (struct pager_requests): Renamed struct requests to
struct pager_requests. Replaced queue with queue_in and queue_out
pointers. Added inhibit_wakeup field.
(pager_demuxer): Updated to use new queue_in/queue_out pointers. Only
wake up workers if not inhibited.
(worker_func): Updated to use new queue_in/queue_out pointers. Final
worker thread to sleep notifies the inhibit_wakeup condition variable.
(pager_start_workers): Added out parameter for the requests instance.
Allocate heap space shared by both queues. Initialise new inhibit_wakeup
condition.
(pager_inhibit_workers,pager_resume_workers): New functions.
* libpager/pager.h (struct pager_requests): Public forward definition.
(pager_start_workers): Added out parameter for the requests instance.
(pager_inhibit_workers,pager_resume_workers): New functions.
* libpager/queue.h (queue_empty): New function.
* storeio/pager.c (pager_requests): New variable.
(init_dev_paging): Updated call to pager_start_workers to use new
pager_requests variable.
</content>
</entry>
<entry>
<title>lib*: Fix typos in comments (found by codespell)</title>
<updated>2015-01-03T12:07:30Z</updated>
<author>
<name>Stefan Weil</name>
<email>sw@weilnetz.de</email>
</author>
<published>2015-01-03T09:16:10Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=8f5e94f48e7668e3c5dcaa1cde1b8f591c05bb58'/>
<id>urn:sha1:8f5e94f48e7668e3c5dcaa1cde1b8f591c05bb58</id>
<content type='text'>
Signed-off-by: Stefan Weil &lt;sw@weilnetz.de&gt;
</content>
</entry>
<entry>
<title>Replace `bcopy' with `memcpy' or `memmove' as appropriate</title>
<updated>2014-12-10T15:09:53Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-12-01T23:20:51Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=82a87d043498eeacb7e4f3edc85d1b7c424ea853'/>
<id>urn:sha1:82a87d043498eeacb7e4f3edc85d1b7c424ea853</id>
<content type='text'>
* ext2fs/inode.c: Replace `bcopy' with `memcpy' or `memmove' as
appropriate.
* ext2fs/pager.c: Likewise.
* isofs/lookup.c: Likewise.
* isofs/main.c: Likewise.
* isofs/rr.c: Likewise.
* libdiskfs/file-get-trans.c: Likewise.
* libiohelp/return-buffer.c: Likewise.
* libpager/pagemap.c: Likewise.
* libpipe/pq.c: Likewise.
* libpipe/pq.h: Likewise.
* libstore/unzipstore.c: Likewise.
* mach-defpager/default_pager.c: Likewise.
* pfinet/ethernet.c: Likewise.
* pfinet/tunnel.c: Likewise.
* storeio/dev.c: Likewise.
</content>
</entry>
<entry>
<title>libpager: use libports notification functions</title>
<updated>2014-12-10T12:45:05Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-12-07T16:57:14Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=6a2dec41b11492b3d6295e9546934f3cf10e6e74'/>
<id>urn:sha1:6a2dec41b11492b3d6295e9546934f3cf10e6e74</id>
<content type='text'>
Now that we do not use sequence numbers anymore, we can simply use
libports notification server functions.

* libpager/Makefile (SRCS): Drop `no-senders.c', and `notify-stubs.c'.
(OBJS): Drop `notifyServer.o'.
* libpager/demuxer.c (pager_demuxer): Use libports server functions.
* libpager/mig-mutate.h: Drop all notification mutators.
* libpager/no-senders.c: Remove file.
* libpager/notify-stubs.c: Likewise.
</content>
</entry>
<entry>
<title>libpager: remove the `seqno' parameters</title>
<updated>2014-12-10T12:45:05Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-12-07T16:22:31Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=f878de5006045c849415afffaffc909458b5f6de'/>
<id>urn:sha1:f878de5006045c849415afffaffc909458b5f6de</id>
<content type='text'>
* libpager/Makefile (MIGSFLAGS): Drop `-DSEQNOS'.
* libpager/priv.h (struct pager): Drop fields `seqno' and `waitingforseqno'.
* libpager/chg-compl.c: Adopt accordingly.
* libpager/data-request.c: Likewise.
* libpager/data-return.c: Likewise.
* libpager/data-unlock.c: Likewise.
* libpager/demuxer.c: Likewise.
* libpager/lock-completed.c: Likewise.
* libpager/no-senders.c: Likewise.
* libpager/notify-stubs.c: Likewise.
* libpager/object-init.c: Likewise.
* libpager/object-terminate.c: Likewise.
* libpager/pager-create.c: Likewise.
* libpager/stubs.c: Likewise.
</content>
</entry>
<entry>
<title>libpager: add a payload-aware intrans function</title>
<updated>2014-12-07T14:38:18Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-04-04T12:19:59Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=0095490a7918ba60483d656214dd9080601e886f'/>
<id>urn:sha1:0095490a7918ba60483d656214dd9080601e886f</id>
<content type='text'>
* libpager/mig-decls.h (begin_using_pager_payload): New function.
* libpager/mig-mutate.h: Add mutators.
</content>
</entry>
<entry>
<title>libpager: make the request queue more memory-efficient</title>
<updated>2014-11-23T17:11:30Z</updated>
<author>
<name>Justus Winter</name>
<email>4winter@informatik.uni-hamburg.de</email>
</author>
<published>2014-11-23T17:11:30Z</published>
<link rel='alternate' type='text/html' href='https://darnassus.sceen.net/cgit/teythoon/hurd.git/commit/?id=b3fcdc50024b3837a76cd854d02a940dac2e5dc3'/>
<id>urn:sha1:b3fcdc50024b3837a76cd854d02a940dac2e5dc3</id>
<content type='text'>
Previously, `pager_demuxer' allocated a chunk of memory for the
response message.  But if memory gets scarce, the kernel will issue a
large number of paging requests to free up memory.  In such a
situation, allocating memory is dangerous.

Fix this by not allocating space for the response message, rather, use
a chunk of the workers stack space.  Also, we only handle the `notify'
and `memory_object' protocol, which both only contain simple routines,
we only need a `mig_response_header_t'.

* libpager/demuxer.c (struct request): Remove `inp' and `outp'.
(request_inp): New function.
(pager_demuxer): Do not allocate memory for the response.
(mig_reply_setup): New function.
(worker_func): Adjust accordingly.
</content>
</entry>
</feed>
