Official MINIX sources - Automatically replicated from gerrit.minix3.org
Go to file
David van Moolenbroek 3c9855d318 flagday-chardev WIP, jenkins testing only, #2
Squashed commit of the following:

commit 57ad74f37cf5f4cfe9196478d726ac8492333ddc
Author: David van Moolenbroek <david@minix3.org>
Date:   Sat Aug 31 16:13:37 2013 +0200

    tests: add test77 for opening/closing PTYs

    Change-Id: I30e3418f75137aa08037fa6581ff3d4cce32a114

commit 6b685b18cfbadf04a5c072a1be5e523a3603624f
Author: David van Moolenbroek <david@minix3.org>
Date:   Sat Aug 31 16:08:25 2013 +0200

    TTY: fix for PTY open/close logic

    Opening and closing the master side of a pseudo terminal without
    opening the slave side would result in the pseudo terminal becoming
    permanently unavailable.  In addition, reopening the slave side
    would be possible but not allow for I/O.  Finally, attempting to
    open an in-use master would wipe its I/O state.  These issues have
    been resolved.

    Change-Id: I9235e3d9aba321803f9280b86b6b5e3646ad5ef3

commit 124e23e33a0242d34f53dbe1763c7e7e12c3b609
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 18:48:56 2013 +0200

    tests: remove select subdirectory

    This test set has been obsoleted by test40.

    Change-Id: I55439152824906778ad07d409dfb327ac10bea70

commit 78759bbb817772deafb57f2d19d4bf622f49674e
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 18:43:23 2013 +0200

    tests: add test76 for interrupting VFS operations

    Change-Id: Ic436cac61de8c42e0c7ee2d442c647528654cde9

commit 3b1a7b0b2e8a69e04d1fbfe94931f8fa19f5f590
Author: David van Moolenbroek <david@minix3.org>
Date:   Wed Aug 28 13:08:16 2013 +0200

    VFS: fix interruption of blocking pipe operations

    POSIX states that when interrupted, partially successful pipe
    operations should return the partial result rather than EINTR. VFS
    previously wouldn't look at the partial result, and not clear it
    either, which would result in a panic upon the next pipe operation.

    Change-Id: Ia1eb72b4b77394051444e63a1390d49bb315eb04

commit 2f24105efbcf9d9ae19befea22d6d07cd26315ba
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 00:57:16 2013 +0200

    libmthread: do not dump stack for free threads

    Change-Id: Ic438a252f5bddaf1513f554c71173e6fffb0c674

commit 4a1b503d6223554274d8357559ffe5eaaa53d266
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 14:00:50 2013 +0200

    VFS: worker thread model overhaul

    The main purpose of this patch is to fix handling of unpause calls
    from PM while another call is ongoing. The solution to this problem
    sparked a full revision of the threading model, consisting of a large
    number of related changes:

    - all active worker threads are now always associated with a process,
      and every process has at most one active thread working for it;
    - the process lock is always held by a process's worker thread;
    - a process can now have both normal work and postponed PM work
      associated to it;
    - timer expiry and non-postponed PM work is done from the main thread;
    - filp garbage collection is done from a thread associated with VFS;
    - reboot calls from PM are now done from a thread associated with PM;
    - the DS events handler is protected from starting multiple threads;
    - support for a system worker thread has been removed;
    - the deadlock recovery thread has been replaced by a parameter to the
      worker_start() function; the number of worker threads has
      consequently been increased by one;
    - saving and restoring of global but per-thread variables is now
      centralized in worker_suspend() and worker_resume(); err_code is now
      saved and restored in all cases;
    - the concept of jobs has been removed, and job_m_in now points to a
      message stored in the worker thread structure instead;
    - the PM lock has been removed;
    - the separate exec lock has been replaced by a lock on the VM
      process, which was already being locked for exec calls anyway;
    - PM_UNPAUSE is now processed as a postponed PM request, from a thread
      associated with the target process;
    - the FP_DROP_WORK flag has been removed, since it is no longer more
      than just an optimization and only applied to processes operating on
      a pipe when getting killed;
    - assignment to "fp" now takes place only when obtaining new work in
      the main thread or a worker thread, when resuming execution of a
      thread, and in the special case of exiting processes during reboot;
    - there are no longer special cases where the yield() call is used to
      force a thread to run.

    Change-Id: I7a97b9b95c2450454a9b5318dfa0e6150d4e6858

commit 41bdfef9ff26f6ef4e597409d9289e0c607ac597
Author: David van Moolenbroek <david@minix3.org>
Date:   Wed Aug 28 15:58:30 2013 +0200

    Retire ptrace(T_DUMPCORE), dumpcore(1), gcore(1)

    The T_DUMPCORE implementation was not only broken - it would currently
    produce a coredump of the tracer process rather than the traced
    process - but also deeply flawed, and fixing it would require serious
    alteration of PM's internal state machine. It should be possible to
    implement the same functionality in userland, and that is now the
    suggested way forward. For now, also remove the (identical) utilities
    using T_DUMPCORE: dumpcore(1) and gcore(1).

    Change-Id: I1d51be19c739362b8a5833de949b76382a1edbcc

commit a4d9359e197b08076cf7f9105ca3079645cf3f08
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 13:42:51 2013 +0200

    VFS: process char driver replies from main thread

    Previously, processing of some replies coming from character drivers
    could block on locks, and therefore, such processing was done from
    threads that were associated to the character driver process. The
    hidden consequence of this was that if all threads were in use, VFS
    could drop replies coming from the driver. This patch returns VFS to
    a situation where the replies from character drivers are processed
    instantly from the main thread, by removing the situations that may
    cause VFS to block while handling those replies.

    - change the locking model for select, so that it will never block
      on any processing that happens after the select call has been set
      up, in particular processing of character driver select replies;
    - clearly mark all select routines that may never block;
    - protect against race conditions in do_select as result of the
      locking that still does happen there (as is required for pipes);
    - also handle select timers from the main thread;
    - move processing of character driver replies into device.c.

    Change-Id: I4dc8e69f265cbd178de0fbf321d35f58f067cc57

commit f37ea0aa87eccbda3ea3afb981fe9b6a7fdfcfb1
Author: David van Moolenbroek <david@minix3.org>
Date:   Sun Aug 25 00:26:38 2013 +0200

    VFS: properly cancel select queries on unpause

    Change-Id: I16e71db3f5c1bcc7ba6045bc9f02b13d71dc31eb

commit adc1f49617a5f8b55dd4d8f99826b0023a428adb
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 13:33:56 2013 +0200

    VFS: remove support for sync char driver protocol

    Change-Id: I57cc870a053b813b3a3fc45da46606ea84fe4cb1

commit b0ed817443fc7bace794e624db17dfe1009639a6
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 13:00:44 2013 +0200

    VFS: remove FP_BLOCKED_ON_DOPEN

    These days, DEV_OPEN calls to character drivers block the calling
    thread until completion or failure, and thus never return SUSPEND to
    the caller. The same already applied to BDEV_OPEN calls to block
    drivers. It has thus become impossible for a process to enter a state
    of being blocked on a device open call.

    There is currently no support for restarting device open calls to
    restarted character drivers. This support was present in the _DOPEN
    logic, but was already no longer triggering. In the future, this case
    should be handled by the thread performing the open request.

    Change-Id: I6cc1e7b4c9ed116c6ce160b315e6e060124dce00

commit 6a4f163effde86b12c9ed33ee75ac242d2b93d49
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 12:18:27 2013 +0200

    PFS: remember request information for IOCTLs

    Not doing so caused PFS to commit protocol violations by relying on
    stale information when sending replies. This stale information always
    happened to be correct, which is why the problem went unnoticed.
    Change-Id: Ia42ca670718d6e731193cd2c34a3ff455f8a94d3

commit 670d1b653c6ec193b46128e43e46f5c3d3e7c075
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 11:14:03 2013 +0200

    Retire the synchronous character driver protocol

    - change all sync char drivers into async drivers;
    - retire support for the sync protocol in libchardev;
    - remove async dev style, as this is now the default;
    - remove dev_status from VFS;
    - clean up now-unused protocol messages.

    Change-Id: I6aacff712292f6b29f2ccd51bc1e7d7003723e87

commit 98df6d244aa20c1df8bb92238b604c36433a86d8
Author: David van Moolenbroek <david@minix3.org>
Date:   Fri Aug 30 10:48:34 2013 +0200

    Sync char protocol: add nonblocking transfer flag

    The async char protocol already has this, so this patch closes the
    gap between the two protocols a bit. Support for this flag has been
    added to all sync char drivers that support CANCEL at all.

    The LOG driver was already using the asynchronous protocol, but it
    did not support the nonblocking transfer flag. This has been fixed
    as well.

    Change-Id: Ia55432c9f102765b59ad3feb45a8bd47a782c93f

commit 76faed46459809e7a3b880968777044c1abb7a92
Author: David van Moolenbroek <david@minix3.org>
Date:   Sat Aug 24 12:29:39 2013 +0200

    VFS: set w_drv_sendrec only when needed

    As with w_task, this ensures that the field remains cleared if it is
    not used. Without this, worker_stop could mistakenly identify a thread
    as talking to a device driver rather than a (crashed) file server.

    Change-Id: I7d3ebed3efc3cd4f5c891f61c67a6463109b6376

commit c4863009b5171164f5d8124002f91d5536ca400e
Author: Thomas Veerman <thomas@minix3.org>
Date:   Sat Aug 24 12:23:41 2013 +0200

    VFS: set w_task only when needed

    It was always set, but not always cleared, when talking to asynchronous
    drivers. This could cause erratic behavior upon a driver crash.

    Normally, a worker thread's w_task field is set when it's about to
    communicate with a driver or FS. Then upon receiving a reply we can
    do sanity checks (that the thread we want to wake up was actually
    waiting for a reply). Also, when a driver/FS crashes, we can identify
    which worker threads were talking to the crashed endpoint and handle
    the error gracefully.

    Asynchronous drivers are a bit special, though. In most cases, the
    sender of the request is not interested in the reply (the sender was
    suspended and only wants to know whether the request was successfully
    caried out or not). However, the open request is special, as the reply
    carries information needed by the sender. This is the only request
    where a worker thread actually yields and waits for the result. This is
    also the only case where we're interested in setting w_task for
    asynchronous drivers.

    Change-Id: Ia1ce2747937df376122b5e13b6a069de27fcc379

Change-Id: I7c9cab02ac73e4eaef1ed9fb4ce7b060911df02a
2013-08-31 16:22:12 +02:00
benchmarks Removing obsolete _MINIX define 2013-02-26 09:44:20 +00:00
bin fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
commands flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
common a bit more -Werror compatability 2013-08-20 11:37:40 +02:00
dist/nvi Termcap update, replacing elvis by nvi. 2013-01-24 07:44:38 +01:00
distrib flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
docs Allow install of binutils and import texinfo 2013-07-12 14:18:08 +02:00
drivers flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
etc flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
external fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
gnu Allow install of binutils and import texinfo 2013-07-12 14:18:08 +02:00
include flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
kernel kernel: add padconf kernel call 2013-08-28 12:53:05 -04:00
lib flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
libexec increase -Werror resilience 2013-08-21 13:53:39 +02:00
man flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
releasetools Importing usr.bin/tr 2013-08-25 18:51:36 +02:00
sbin increase -Werror resilience 2013-08-21 13:53:39 +02:00
servers flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
share fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
sys flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
test flagday-chardev WIP, jenkins testing only, #2 2013-08-31 16:22:12 +02:00
tests fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
tools gcc: realize gas supports visibility 2013-08-26 18:02:43 +00:00
usr.bin fix a few more minix specific warnings 2013-08-27 16:16:03 +00:00
usr.sbin increase -Werror resilience 2013-08-21 13:53:39 +02:00
.gitignore gitignore: ignore some more generated files 2012-12-06 13:29:20 +00:00
.gitreview misc:Add gerrit code review support. 2013-01-16 09:44:16 +01:00
build.sh Reverting back to default value of MKARZERO 2013-01-17 10:03:58 +01:00
LICENSE Fix parameter parsing in cut 2010-01-21 10:16:05 +00:00
Makefile Importing NetBSD "Kyua" test framework 2013-07-23 20:43:41 +02:00