Commit graph

3919 commits

Author SHA1 Message Date
Tomas Hruby ebbc730fc3 spurious and error interrupt apic handlers
- fixed spurious and error interrupt handlers

- not to hog the system the warning isn't reported every time, just
  once every 100 times, similarly for the spurious PIC interrupts
2010-10-19 17:07:21 +00:00
Tomas Hruby f42b90806a BSP apic id
- BSP apic id used uninitialized causes problems
2010-10-19 17:07:19 +00:00
Tomas Hruby e6b1a30a26 panic in dummy apic handlers
- as panic can do the same as printf now, let's rather panic when a
  dummy apic interrupt vector handler is hit
2010-10-19 17:07:17 +00:00
Tomas Hruby 2419ab589d Fixed BKL statistics 2010-10-19 17:07:11 +00:00
Tomas Hruby 7fddd8358d PCI driver debug output fix
- bus number (busnr) must be used instead of internal busind
2010-10-19 10:30:15 +00:00
Tomas Hruby 8145b458d6 A klib.S include fix
- by Antoine Leca
2010-10-15 22:21:01 +00:00
Tomas Hruby 613ff40936 acpi driver Makefile fix
- by Antoine Leca
2010-10-15 22:20:01 +00:00
Ben Gras b0d7ce8d09 <minix/hash.h> 2010-10-15 11:25:40 +00:00
Ben Gras ddde360e3e vm - hash table for block cache 2010-10-15 09:10:14 +00:00
Ben Gras cb2e3a98a2 vm - fix for not placing region outside requested mmap addr 2010-10-15 09:09:29 +00:00
Erik van der Kouwe 431a5a556d e1000: add 82574L ethernet adapter (thx Niek for your comments) 2010-10-15 08:53:22 +00:00
Ben Gras e743f940d4 profile command - correct logic error
- this caused profile to complain about frequency when
    no command (start, stop) was given.
2010-10-12 11:26:47 +00:00
Ben Gras b653422883 mfs - no more WRITE_IMMED 2010-10-11 15:35:43 +00:00
Ben Gras 26de8dd299 change SSIZE_MAX to INT_MAX instead of 32767.
With this change, suggested by Gautam Tirumala, ports for pkgin and
pkg_install are cleaner and so easier to upstream.  Presumably other
ports will be smoother too.

There doesn't seem to be a reason SSIZE_MAX was so small to begin with.
2010-10-10 22:33:23 +00:00
Erik van der Kouwe 9235536f38 Fix select-related bugs: missing cancellations led to potentially forgetting notifies, especially in the case of async drivers 2010-10-08 12:50:52 +00:00
Erik van der Kouwe 470a185909 Add libdriver support for async ioctl replies 2010-10-08 09:33:18 +00:00
Ben Gras a3f2df124c vm optimisation - maintain hint for new virtual region position. 2010-10-07 10:04:05 +00:00
Ben Gras e0ac271e5a include <sys/cdefs.h> in <minix/sysutil> (clang fix) 2010-10-06 13:09:49 +00:00
Erik van der Kouwe ada0b4ca04 Fix warnings due to missing __dead attribute on exit 2010-10-05 07:25:47 +00:00
Erik van der Kouwe 591201c1a0 Fix warnings in libmthread 2010-10-04 20:19:40 +00:00
Ben Gras c521f2a138 kernel: fix idle time accounting. 2010-10-04 19:12:55 +00:00
Erik van der Kouwe b0eaf0bc27 make system server vprintf check for NULL 2010-10-04 17:53:18 +00:00
Erik van der Kouwe 7bc944c8a9 fflush is neither needed nor allowed in system srvers, which is where SEF is used 2010-10-04 17:38:53 +00:00
Arun Thomas 40ccb7ed54 Add include/memory.h
Some ports expect that it exists.
2010-10-04 13:37:46 +00:00
Ben Gras 98ddbffe6e dis386 - a disassembler for ack
- it can disassemble object files (dis386o) and executables
    (dis386a)
  - only useful for as long as we still have ack
2010-10-04 13:26:53 +00:00
Ben Gras e2570d9b1b vm: optimisation: avl tree for virtual regions
- regions were preivous stored in a linked list, as 'normally'
    there are just 2 or 3 (text, data, stack), but that's slow
    if lots of regions are made with mmap()

  - measurable performance improvement with gcc and clang
2010-10-04 11:41:10 +00:00
Ben Gras 36189370a5 vm: don't check the range of memory during sanity checking
- too many false positives due to memory that is mapped in
    legitimately (acpi, i/o devices)
2010-10-04 11:38:33 +00:00
Arun Thomas 677d80b781 Remove urlget
This patch gets rid of urlget. It's not used for anything now, since pkgin
uses fetch.

Arun
2010-10-02 18:24:53 +00:00
Ben Gras 68de328ac1 make the asynsend table size NPROCS-dependent.
this is a fix for e.g. the situation where lots of processes die
instantly, and PM has to send an asyn msg for each one to VFS, and
panics if there are too many. there are likely more situations in
which this table should be dependent on the no. of processes.

reported by pikpik on #minix3.
2010-10-01 14:39:04 +00:00
Thomas Veerman a7072a5e1c Revamp the mthread library and update test59
Before, the 'main thread' of a process was never taken into account anywhere in
the library, causing mutexes not to work properly (and consequently, neither
did the condition variables). For example, if the 'main thread' (that is, the
thread which is started at the beginning of a process; not a spawned thread by
the library) would lock a mutex, it wasn't actually locked.
2010-09-30 13:44:13 +00:00
David van Moolenbroek 3736ce3f55 hgfs: do not return negative file sizes in stat (reported by Antoine Leca) 2010-09-27 13:19:25 +00:00
Tomas Hruby 1786291e32 Watchdog and kernel profiling for AMD
- a different set of MSRs and performance counters is used on AMD

- when initializing NMI watchdog the test for Intel architecture
  performance counters feature only applies to Intel now

- NMI is enabled if the CPU belongs to a family which has the
  performance counters that we use
2010-09-23 14:42:30 +00:00
Tomas Hruby 274fcf8d1f neg64() makes a 64bit integer negative
- neg64(a) == -a

- although we only support 64 bit unsigned arithmetics sometimes it's good to
  have a 2-complement negative number
2010-09-23 14:42:26 +00:00
Tomas Hruby 8eece1c00c CPU type detection
- sometimes the system needs to know precisely on what type of cpu is
  running. The cpu type id detected during arch specific
  initialization and kept in the machine structure for later use.

- as a side-effect the information is exported to userland
2010-09-23 14:42:19 +00:00
Ben Gras 6e385a1b01 cprofalyze - perl path fix. 2010-09-23 13:49:52 +00:00
Tomas Hruby 9cf2c02c47 Long (32 char) symbol names in sprofalyze 2010-09-23 10:49:58 +00:00
Tomas Hruby de96892970 sprofalyze only warns when executables don't exist
- e.g. when acpi is not compiled, now we can include it

- the script still fails if a symbol from a non existent binary is
  found in the profile log
2010-09-23 10:49:57 +00:00
Tomas Hruby 45d3ef7b3c sprofalyze detects what nm to use 2010-09-23 10:49:55 +00:00
Tomas Hruby ef92583c3a Busy idle loop when profiling
- the Intel architecture cycle counter (performance counter) does not
  count when the CPU is idle therefore we use busy loop instead of
  halting the cpu when there is nothing to schedule

- the downside is that handling interrupts may be accounted as idle
  time if a sample is taken before we get out of the nested trap and
  pick a new process
2010-09-23 10:49:52 +00:00
Tomas Hruby d2b56f60da sprofile exports kernel sample entries
- in case of kernel hit while proc_ptr is IDLE, account for idle time
  instead of taking kernel sample
2010-09-23 10:49:50 +00:00
Tomas Hruby 87c576584d Internal 64M buffer for profiling
- when profiling is compiled in kernel includes a 64M buffer for
  sample

- 64M is the default used by profile tool as its buffer

- when using nmi profiling it is not possible to always copy sample
  stright to userland as the nmi may (and does) happen in bad moments

- reduces sampling overhead as samples are copied out only when
  profiling stops
2010-09-23 10:49:48 +00:00
Tomas Hruby e63b85a50b NMI sampling
- if profile --nmi kernel uses NMI watchdog based sampling based on
  Intel architecture performance counters

- using NMI makes kernel profiling possible

- watchdog kernel lockup detection is disabled while sampling as we
  may get unpredictable interrupts in kernel and thus possibly many
  false positives

- if watchdog is not enabled at boot time, profiling enables it and
  turns it of again when done
2010-09-23 10:49:45 +00:00
Tomas Hruby 74c5cd7668 The profile utility can set the sprofiling mode
- profile --nmi | --rtc sets the profiling mode

- --rtc is default, uses BIOS RTC, cannot profile kernel the presetted
  frequency values apply

- --nmi is only available in APIC mode as it uses the NMI watchdog, -f
  allows any frequency in Hz

- both modes use compatible data structures
2010-09-23 10:49:42 +00:00
Tomas Hruby db12229ce3 New profile protocol
- when kernel profiles a process for the first time it saves an entry
  describing the process [endpoint|name]

- every profile sample is only [endpoint|pc]

- profile utility creates a table of endpoint <-> name relations and
  translates endpoints of samples into names and writing out the
  results to comply with the processing tools

- "task" endpoints like KERNEL are negative thus we must cast it to
  unsigned when hashing
2010-09-23 10:49:39 +00:00
Tomas Hruby 123a968be3 32bit process flags
- we are running out of space in 16bit flags
2010-09-23 10:49:36 +00:00
David van Moolenbroek adbc4e4ea7 libsys: tsc_to_micros support for large TSC delta values 2010-09-23 09:26:42 +00:00
Thomas Veerman 62aba4396e Get rid of erroneous define 2010-09-23 08:52:49 +00:00
Ben Gras d55eab30fa includes - minor compile fixes. 2010-09-22 14:31:51 +00:00
Ben Gras 82d576c9ca enable_fpu_exception() - only write cr0 if bit isn't already on.
(NMI profiling results indicate this both is relatively expensive and
happens a lot unnecessarily if the fpu is in use.)
2010-09-22 14:31:06 +00:00
Tomas Hruby b0572bfd1e No need to scan devices in PIC mode 2010-09-22 08:01:43 +00:00