summaryrefslogtreecommitdiffstats
path: root/lib/libkvm
Commit message (Collapse)AuthorAgeFilesLines
* First cut at doing the kvm file needed for mips.imp2008-07-231-0/+90
| | | | Obtained from: gonzo@
* Use _WANT_FILE to make struct file visible from userland. This ispjd2008-05-261-2/+1
| | | | | | similar to _WANT_UCRED and _WANT_PRISON and seems to be much nicer than defining _KERNEL. It is also needed for my sys/refcount.h change going in soon.
* - Don't inspect the P_SA flag. It's being removed.jeff2008-03-121-7/+2
|
* Plug memory leaks that is observed when argbuf or argspc is used in thedelphij2008-01-121-0/+4
| | | | | | | | context. Submitted by: Michal Vranek <michal.vranek seznam cz> PR: bin/118380 MFC after: 1 month
* - Update kvm_deadfiles to be compatible with the new system which has nojeff2007-12-301-44/+87
| | | | | | | | global list of all files. - Mark kvm_getfiles() as broken since the live version exports struct xfile with no filelist at the head and does so incorrectly and the deadfiles version exports struct file with a filelist at the head. It is not known if either version works or complies to the manpage.
* Aparrently MACXOCOMLEN exisrts only on my machinejulian2007-10-261-1/+1
|
* Introduce a way to make pure kernal threads.julian2007-10-261-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | kthread_add() takes the same parameters as the old kthread_create() plus a pointer to a process structure, and adds a kernel thread to that process. kproc_kthread_add() takes the parameters for kthread_add, plus a process name and a pointer to a pointer to a process instead of just a pointer, and if the proc * is NULL, it creates the process to the specifications required, before adding the thread to it. All other old kthread_xxx() calls return, but act on (struct thread *) instead of (struct proc *). One reason to change the name is so that any old kernel modules that are lying around and expect kthread_create() to make a process will not just accidentally link. fix top to show kernel threads by their thread name in -SH mode add a tdnam formatting option to ps to show thread names. make all idle threads actual kthreads and put them into their own idled process. make all interrupt threads kthreads and put them in an interd process (mainly for aesthetic and accounting reasons) rename proc 0 to be 'kernel' and it's swapper thread is now 'swapper' man page fixes to follow.
* - When using kvm use the new conversion method to derive swtime.jeff2007-09-211-3/+16
| | | | Approved by: re
* - Move all of the PS_ flags into either p_flag or td_flags.jeff2007-09-171-2/+2
| | | | | | | | | | | | | | - p_sflag was mostly protected by PROC_LOCK rather than the PROC_SLOCK or previously the sched_lock. These bugs have existed for some time. - Allow swapout to try each thread in a process individually and then swapin the whole process if any of these fail. This allows us to move most scheduler related swap flags into td_flags. - Keep ki_sflag for backwards compat but change all in source tools to use the new and more correct location of P_INMEM. Reported by: pho Reviewed by: attilio, kib Approved by: re (kensmith)
* Re-enable raw dump format support on i386 and amd64 for /dev/fwmem.simokawa2007-06-154-18/+39
|
* - Work-around the already partially broken rusage support in kvm byjeff2007-06-011-0/+2
| | | | | | completely disabling it until a full solution is agreed upon. Pointy hat to: me
* Add a level of indirection to the kernel PTE table. The oldmarcel2007-05-191-8/+16
| | | | | | | | | scheme allowed for 1024 PTE pages, each containing 256 PTEs. This yielded 2GB of KVA. This is not enough to boot a kernel on a 16GB box and in general too low for a 64-bit machine. By adding a level of indirection we now have 1024 2nd-level directory pages, each capable of supporting 2GB of KVA. This brings the grand total to 2TB of KVA.
* - Move 'struct swdevt' back into swap_pager.h and expose it to userland.jhb2007-02-071-5/+94
| | | | | | | | - Restore support for fetching swap information from crash dumps via kvm_get_swapinfo(3) to fix pstat -T/-s on crash dumps. Reviewed by: arch@, phk MFC after: 1 week
* Per Olivier Houchard, use the proper license for this file. Heimp2007-01-081-10/+10
| | | | | | | bogusly used the kvm_powerpc.c file as a template for the license, but then either wrote the code himself, or cribbed it from the kvm_i386 file. The only thing from the kvm_powerpc.c file was the license. Correct this mistake with his blessing.
* Remove the advertising clause. UCB did this some time ago, but theseimp2007-01-0818-72/+0
| | | | | | files were never updated to reflect that. MFC After: 2 days
* remove already commented out codejulian2006-12-061-33/+0
|
* Make KSE a kernel option, turned on by default in all GENERICjb2006-10-261-4/+4
| | | | | | | kernel configs except sun4v (which doesn't process signals properly with KSE). Reviewed by: davidxu@
* unbreak build for sparc64 etc.kmacy2006-10-091-1/+2
| | | | | | | TARGET won't be defined on non subarches Approved by: rwatson (mentor) Reviewed by: jmg
* buildworld fixes for sun4vkmacy2006-10-092-0/+8
| | | | | | | not sure why pmap.c is included as it is unchanged Approved by: rwatson (mentor) Reviewed by: jmg
* Don't forget to set internal error message in kvm_nlist().wkoszek2006-09-201-2/+7
| | | | Approved by: cognet (mentor)
* Remove alpha-specific stuff.ru2006-08-231-213/+0
|
* Rev. 1.44 of this file didn't introduce a right solution,yar2006-07-251-0/+7
| | | | | | | but we don't seem to have one yet, so just add an XXX comment on passing rux_runtime to bintime2timeval() wrongly. Spotted by: gcc(1) (warning)
* Include strings.h for bzero()delphij2006-06-052-0/+2
|
* Teach libkvm how to read minidumps. It turns out that minidumps arepeter2006-04-216-0/+580
| | | | | | | | | | | | | | far more convenient for libkvm to work with because of the page table block at the beginning. As a result, the MD code is smaller. libkvm will automatically detect old vs mini dumps on i386 and amd64. libkvm will handle i386 PAE and non-PAE modes. There is a PAE flag in the i386 minidump header to signal the width of the entries in the page table block. Other convenient values are also present, such as kernbase and the direct map addresses on amd64.
* Validate that the supplied file is not empty before trying mmap(2) itcsjp2006-01-151-0/+5
| | | | | | | | and access the pages associated with it. Submitted by: Wojciech A. Koszek PR: bin/91411 MFC after: 1 week
* Fix a well duplicated fencepost error that stopped crashdumps beingpeter2005-10-202-7/+7
| | | | | | | | readable on certain random memory configurations. If the libkvm consumer tried to read something that was in the very last pdpe, pde or pte slot, it would bogusly fail. This is broken in RELENG_6 too.
* libkvm bits for arm.cognet2005-10-031-18/+162
|
* Fix the alpha build by using the correct argument types for _kvm_kvatop().scottl2005-07-021-1/+1
| | | | | Submitted by: marcel Approved by: re (implicit)
* Match _kvm_kvatop to it's prototype in kvm_i386.c. This unbreaksps2005-06-301-1/+1
| | | | | | the build. Approved by: re
* Support crash dumps > 4GB in size on 32 bit platforms. _kvm_kvatop()peter2005-06-299-99/+426
| | | | | | | | | | | | | | | | | | | | | returned an lseek offset in a "u_long *" value, which can't express >4GB offsets on 32 bit machines (eg: PAE). Change to "off_t *" for all. Support ELF crashdumps on i386 and amd64. Support PAE crashdumps on i386. This is done by auto-detecting the presence of the IdlePDPT which means that PAE is active. I used Marcel's _kvm_pa2off strategy and ELF header reader for ELF support on amd64. Paul Saab ported the amd64 changes to i386 and we implemented the PAE support from there. Note that gdb6 in the src tree uses whatever libkvm supports. If you want to debug an old crash dump, you might want to keep an old libkvm.so handy and use LD_PRELOAD or the like. This does not detect the old raw dump format. Approved by: re
* Set ki_tdev to NODEV rather than NULL.peter2005-06-241-1/+1
| | | | Approved by: re
* Make kvm(3) aware of ki_jid field.pjd2005-03-201-1/+17
| | | | | Reviewed by: gad MFC after: 3 days
* Dike out unwarranted reference to si_udev.phk2005-03-151-0/+4
|
* Sort sections.ru2005-01-204-29/+29
|
* In preparation to remove U areas, don't refer to p_uarea in libkvm.das2004-11-201-1/+1
| | | | Reviewed by: arch@
* Remove un-needed call to close(2). The fd that close is beingcsjp2004-11-131-1/+0
| | | | | | called on is invalid and has no use. Reviewed by: smkelly
* Document the fact that kvm_getenvv(3) requires procfs to be mountedcsjp2004-11-131-0/+7
| | | | | | on /proc in order to operate correctly. Reviewed by: simon@, wes@
* Belatedly catch up with the dev_t/cdev changes from a few months back.peter2004-10-111-1/+11
| | | | | | | Extract the struct cdev pointer and the tty device from inside rather than incorrectly casting the 'struct cdev *' pointer to a 'dev_t' int. Not that this was particularly important since it was only used for reading vmcore files.
* - Fix the compile to chase the p_rux changes.jhb2004-10-061-1/+7
| | | | | | | - Add a comment noting that the ru_[us]times values being read aren't actually valid and need to be computed from the raw values. Submitted by: many (1)
* Redefine a PTE as a 64-bit integral type instead of a struct ofmarcel2004-09-231-2/+2
| | | | | bit-fields. Unify the PTE defines accordingly and update all uses.
* The offset argument to mmap(2) is not a pointer. Use 0 instead of NULL.marcel2004-09-221-1/+1
|
* Refactor a bunch of scheduler code to give basically the same behaviourjulian2004-09-051-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | but with slightly cleaned up interfaces. The KSE structure has become the same as the "per thread scheduler private data" structure. In order to not make the diffs too great one is #defined as the other at this time. The KSE (or td_sched) structure is now allocated per thread and has no allocation code of its own. Concurrency for a KSEGRP is now kept track of via a simple pair of counters rather than using KSE structures as tokens. Since the KSE structure is different in each scheduler, kern_switch.c is now included at the end of each scheduler. Nothing outside the scheduler knows the contents of the KSE (aka td_sched) structure. The fields in the ksegrp structure that are to do with the scheduler's queueing mechanisms are now moved to the kg_sched structure. (per ksegrp scheduler private data structure). In other words how the scheduler queues and keeps track of threads is no-one's business except the scheduler's. This should allow people to write experimental schedulers with completely different internal structuring. A scheduler call sched_set_concurrency(kg, N) has been added that notifies teh scheduler that no more than N threads from that ksegrp should be allowed to be on concurrently scheduled. This is also used to enforce 'fainess' at this time so that a ksegrp with 10000 threads can not swamp a the run queue and force out a process with 1 thread, since the current code will not set the concurrency above NCPU, and both schedulers will not allow more than that many onto the system run queue at a time. Each scheduler should eventualy develop their own methods to do this now that they are effectively separated. Rejig libthr's kernel interface to follow the same code paths as linkse for scope system threads. This has slightly hurt libthr's performance but I will work to recover as much of it as I can. Thread exit code has been cleaned up greatly. exit and exec code now transitions a process back to 'standard non-threaded mode' before taking the next step. Reviewed by: scottl, peter MFC after: 1 week
* Expand the license referenced indirectly inline.imp2004-07-312-6/+40
|
* Remove stale code protected by #ifdef sparc. GCC 3.4.x adds sparc tokan2004-07-281-9/+0
| | | | predefined symbols on all SPARC platforms and FreeBSD follows the crowd.
* Mechanically kill hard sentence breaks.ru2004-07-027-23/+46
|
* Markup, grammar, punctuation.ru2004-07-011-14/+14
|
* Fix a test of bit-flag "P_SA" by adding parenthesis around the expression.gad2004-06-231-1/+1
| | | | Submitted by: Cyrille Lefevre
* Replace a call to strncpy() with a call to strlcpy()gad2004-06-231-4/+2
| | | | Submitted by: Cyrille Lefevre
* Fill in the some new fields 'struct kinfo_proc', namely ki_childstime,gad2004-06-191-5/+29
| | | | | | | | | | | | | ki_childutime, and ki_emul. Also uses the timeradd() macro to correct the calculation of ki_childtime. That will correct the value returned when ki_childtime.tv_usec > 1,000,000. This also implements a new KERN_PROC_GID option for kvm_getprocs(). It also implements the KERN_PROC_RGID and KERN_PROC_SESSION options which were added to sys/kern/kern_proc.c revision 1.203. PR: bin/65803 (a very tiny piece of the PR) Submitted by: Cyrille Lefevre
* Second half of the dev_t cleanup.phk2004-06-171-1/+1
| | | | | | | | | | | The big lines are: NODEV -> NULL NOUDEV -> NODEV udev_t -> dev_t udev2dev() -> findcdev() Various minor adjustments including handling of userland access to kernel space struct cdev etc.
OpenPOWER on IntegriCloud