Commit Graph

33267 Commits

Author SHA1 Message Date
Axel Dörfler 675d0b6264 * Fixed compilation when debug is enabled.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34905 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 16:23:58 +00:00
Oliver Tappe 6ed5e0d208 fixed a couple of issues that I encountered when testing our xattr support
(in libgnu.so) with my current rsync port:
* Node now opens its fd with O_RDONLY, as otherwise BFS will refuse to open
  (the attributes of) directories
* Node::Get() and Node::Set() now make use of the encoded attribute type,
  as otherwise all created attributes would have the type 'XATR' (instead
  of the encoded haiku-specific type)
* minor cleanup with respect to the line width limit 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34904 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 15:43:42 +00:00
Oliver Tappe fbb3d94f46 * handle the fact gracefully that some of our BuildSetup jam variables contain
'+' as part of their name, which is illegal for shell variables (where the
  corresponding replacement character is 'X'). 


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34903 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 08:59:10 +00:00
Stefano Ceccherini f7c5116756 Removed the shell invocation from Arguments, moved it into TermApp.
Get the user shell with getpwuid(), since this should be the correct way
to do it (and mmu_man wants it like this).
Note that when opening a new terminal tab, this is ignored, and a fixed
invocation is used (in the Shell class)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34902 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 22:59:18 +00:00
Stefano Ceccherini 71ddd07bcd Fix the build
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34901 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 21:59:26 +00:00
Adrien Destugues cdf46c5c8a Fix lithuanian catalog for locale (was missing a line)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34900 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 21:43:04 +00:00
Adrien Destugues 7b09681d4d Some catalogs were missing from svn. Sorry about it.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34899 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 21:12:13 +00:00
Ingo Weinhold 88675a7eb2 steal_pages(): Recheck sUnreservedFreePages after incrementing sPageDeficit.
Since the former is no longer guarded by any lock, there's a race condition
with vm_page_unreserve_pages() which would cause us to wait longer than
necessary.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34898 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 20:43:25 +00:00
Ingo Weinhold 90daf7c61e * init_after_fork(): In case the reservation for the heap area failed
sHeapBase will probably not point to memory in the heap area. Use
  sFreeHeapBase instead.
* When reserving the heap area range fails, set sHeapBase to NULL, so we'll
  later know about the fact.
* hoardSbrk(): When resizing the area fails, we'll now try to allocate a new
  one, if the former failure was not due to an "out of memory" situation.
  E.g. if the heap range reservation failed or, if we just have exhausted the
  range, another area could be in the way. Also when mmap()ing over
  malloc()ed, the heap area count be split in two with the first part
  retaining the old area ID, thus preventing resizing as well. Fixed #5168.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34897 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 19:37:25 +00:00
Oliver Tappe 7c4641d0af * added --update option to configure which will re-run the last invocation
(--update must be given as first option, but can be followed by others)
* added simple perl scripts that is used by configure to convert BuildSetup
  from jam to shell format



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34896 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 19:36:58 +00:00
Adrien Destugues b2994d16d3 More lithuanian catalog updates.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34895 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 19:20:28 +00:00
Stefano Ceccherini 74d2e1599a Invoke the shell using /bin/bash instead of /bin/sh.
Use convert_to/from_utf8() directly instead of the homebrewn proxy methods.
Removed CodeConv from the repository.
Remove UTF8WidthTbl.c from the repository, since it's not used anymore.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34894 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 18:37:37 +00:00
Stefano Ceccherini 9f7a3e3406 fAttached was never set in Shell::AttachBuffer(), and that caused
TermParse::StopThreads() in Shell::DetachBuffer() to be never called.
Moved initialization of termios struct to its own functions.
Added const to some methods.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34893 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 18:34:52 +00:00
Ingo Weinhold 3e5498e4c9 Patch by Andreas Färber modified by myself:
* Determine HOST_LD and HOST_OBJCOPY in configure.
* Removed Solaris ld work-around in BuildSetup.

The change requires configure to be re-run. Alternatively HOST_{LD,OBJCOPY}
can be added to generated/build/BuildConfig.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34892 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 17:50:52 +00:00
Axel Dörfler 8dd44be804 * Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34891 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 16:23:14 +00:00
Axel Dörfler 32ac103336 * The Desktop window is no longer zoomable. This fixes ticket #5173.
* Removed no longer used headers (private BeOS device API).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34890 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 16:09:15 +00:00
Scott McCreary 056970a70d Created BasicCommandLineTools OptionalPackage group and moved sed from DevelopmentBase to the new group.
TODO: determine which other command line tools may also fit under this new group.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34889 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 15:45:20 +00:00
Ingo Weinhold 37caa95564 Replaced the sReservedPages counter tracking the page reservations by
sUnreservedFreePages which tracks the difference between free/clear and
reserved pages. Access to it uses atomic operations which allows the three
page (un)reservation to avoid locking in most cases, thus reducing contention
of the "pages" lock.

In the -j8 Haiku image build that decreases the contention of the "pages"
lock to about one third of the previous value. As a positive side effect the
VMCache lock contention drops about the same factor. The total build speedup
is about 20%, the total kernel time drops about 20%.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34888 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 15:26:05 +00:00
Ingo Weinhold 1e175b599b Removed duplicate condition.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34886 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 01:09:58 +00:00
Ingo Weinhold e8db7400e9 Avoid using DoublyLinkedList internals.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34885 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-04 00:11:56 +00:00
Adrien Destugues 8e0fba06cf -Updated esperanto catalogs done by Travis again (fixed your name in AboutSystem too, sorry about that).
-Updated one lituanian catalog from Algirdas. I'm too lazy to fix the others one, sorry.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34884 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 22:35:37 +00:00
Oliver Ruiz Dorantes deac8b50fa - sizeof(TYPE) would cause problems to instantiations of the class with void type
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34883 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 22:35:18 +00:00
Oliver Ruiz Dorantes b64c9fc439 - Make the preflet not to use all workspaces
- CheckStyled


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34882 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 22:06:37 +00:00
Oliver Ruiz Dorantes 23992a691c - Port & Thread string's name allocation was messed and used in InitCheck.
- Style, spacing binary operator



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34881 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 21:30:26 +00:00
Oliver Ruiz Dorantes d923116745 Fix mask and endline style
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34880 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 21:19:47 +00:00
Axel Dörfler 2e095ebca8 * Removed an assert that will now always trigger (due to the DoublyLinkedList
changes).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34878 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 19:12:01 +00:00
Axel Dörfler e7385fa68e * If a block allocation fails, remove an unused one and try again - this might
improve the reliability as long as our slab implementation is a PITA.
* Removed an assertion that will no longer work (due to the DoublyLinkedList
  changes).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34877 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 19:08:40 +00:00
Axel Dörfler e045a8c0df * Solved the problem independently from the list.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34876 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 18:54:52 +00:00
Axel Dörfler 32883e8980 * This should hopefully fix the broken kernel - this code relied on clearing
the next/previous pointers. There might be more, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34875 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 18:24:27 +00:00
Ingo Weinhold 5800e8a486 * Moved the page management functionality into its own file.
* Renamed page_queue to VMPageQueue and made it a proper C++ class. Use
  DoublyLinkedList instead of own list code.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34874 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 17:10:32 +00:00
Ingo Weinhold be7782af0f * Removed DoublyLinkedListLinkImpl constructor. DoublyLinkedListLink doesn't
have one anymore anyway.
* Removed unnecessary setting the list links to NULL after removing a node.
* Replaced "element == NULL" check in Insert() by an assert. This just hid
  potential errors.
* Added Insert{Before,After}() methods and declared the Insert() version
  with the InsertBefore() semantics obsolete.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34873 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 17:07:56 +00:00
Ingo Weinhold 7fc65e1488 fs_unmount(): We need to hold the vnodes write lock after all. The upside is
that it saves us from locking the individual vnodes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34872 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 14:10:43 +00:00
Ingo Weinhold a210e61053 * free_unused_vnodes(): Be a good citizen and use vnode_used() instead of
playing with the unused list manually. This also clears the vnode's unused
  flag, which wasn't done before and would thus cause corruption of the
  unused list a bit later.
* fs_unmount():
  - Fixed an iteration bug I introduced previously. The iterator would be
    advanced twice per iteration, leading to NULL pointer dereferencing
    when the vnode count was odd and skipping the checks for every other
    vnode.
  - All vnodes are going to be freed, so vnode_to_be_freed() has to invoked
    for every one of them. The code wasn't adjusted correctly when
    introducing the hot vnodes handling.
* Adjusted/improved some comments.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34871 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 13:54:22 +00:00
Axel Dörfler e0d09e23a7 * Replaced parse_ip_address_component() with strtol() which is already
available in the boot loader.
* Simplified parse_ip_address() and use style conforming identifiers.
* Some cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34870 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 13:33:20 +00:00
François Revol 65a4a2c2a4 Fix m68k build... /me pets Ingo :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34869 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 03:58:43 +00:00
François Revol 3e3a00b3ff Fix ARM build, which broke due to some *.c->*.cpp change... /me pets Ingo.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34868 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 03:55:26 +00:00
François Revol 55d267a46d Make configure dump its invocation arguments to the BuildConfig file to allow for easier rerun later, as I'm getting tired to figure each of them each time someone adds some config variable...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34867 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 03:05:12 +00:00
Ingo Weinhold 5484890096 * Moved the unused vnode management to a new file. Well the few variables
used for it that is.
* The main cause for the heavy contention of the unused vnodes mutex was that
  relatively few vnodes are actually used for a longer time. Mainly those are
  the volume roots, mmap()ed files, and the files opened by programs. A good
  deal of nodes -- particularly directories -- are just referenced for a very
  short time, e.g. to resolve a path to a contained entry. This caused those
  nodes to be added to and removed from the unused vnodes list very
  frequently, thus resulting in a high contention of the mutex guarding it.
  To address the problem I've introduced an approximation of a set of "hot"
  vnodes, i.e. vnodes that have recently been marked unused. They are stored
  in an array that by means of an r/w locker and atomic operations can most
  of the time be accessed concurrently. Whenever it gets full, it is flushed
  to the actual unused vnodes list.
* dec_vnode_ref_count(): No longer check the unused vnode count every time.
  The called new vnode_unused() does only from time to time and returns when
  the caller is expected to free some of the unused vnodes. As a side effect
  this also fixes a bug I previously introduced: The unused vnode to be freed
  was marked busy without being locked first.

The -j8 Haiku image test build shows that the changes reduce the contention
of the unused vnode list mutex to virtually zero without introducing any
significant contention of the new r/w lock. The VMCache lock contention also
seems to be decreased somewhat, which is probably not that surprising
considering that the page writer acquires/releases vnode references with the
cache lock held. The "pages" lock takes over even more contention, now
causing more than 100000 waits per second.
The total build time reduction is about 4.5%. Kernel time drops more than
10%.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34866 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-03 02:43:32 +00:00
Ingo Weinhold 8ccbb7815c * Moved the vnode structure (to by Vnode class at some time in the future) into
its own header/source files.
* Changed vnode's bit fields to a single, atomically changeable int32 using
  flags instead. Added respective accessor methods.
* Added a per-vnode mutex-like lock, which uses 2 bits of the structure and
  32 global "buckets" which are used for waiter lists for the vnode locks.
* Reorganized the VFS locking a bit:
  Renamed sVnodeMutex to sVnodeLock and made it an r/w lock. In most situations
  it is now only read-locked to reduce its contention. The per-vnode locks guard
  the fields of the vnode structure and the newly introduced sUnusedVnodesLock
  has taken over the job to guard the unused vnodes list.

The main intent of the changes was to reduce the contention of the sVnodeMutex,
which was partially successful. In my standard -j8 Haiku image build test the
new sUnusedVnodesLock took over about a fourth of the former sVnodeMutex
contention, but the sVnodeLock and the vnode locks have virtually no contention
to speak of, now. A lot of contention migrated to the unrelated "pages" mutex
(another bottleneck). The overall build time dropped about 10 %.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34865 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 23:27:41 +00:00
Oliver Tappe 82cbfd3573 first stab at fixing #5091:
* let BuildSetup set HAIKU_HOST_IS_BIG_ENDIAN according to HOST_GCC_MACHINE
* minor cleanup in BuildSetup
* when building ICU, set the endianness indicator suffix according to
  HAIKU_HOST_IS_BIG_ENDIAN

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34864 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 22:11:08 +00:00
Stephan Aßmus 5c9bd9d619 Patch by Andreas Faerber with small changes by myself:
* Skip mappings to non-physical memory in the PPC MMU code. Gets the
   PPC kernel booting a little further.

Thanks! Fixes ticket #5193.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34863 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 18:40:07 +00:00
Stephan Aßmus 8d9e8ba5b7 Patch by Andreas Faerber (small changes by myself):
* Fix compilation with tracing enabled.

Thanks! Fixes ticket #5183.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34862 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 18:34:42 +00:00
Stephan Aßmus 6e95b86e15 Patch by Andreas Faerber:
* Fix compilation when commented out.

Thanks! Fixes ticket #5192.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34861 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 18:31:24 +00:00
Stephan Aßmus e355ce92a4 Patch by Andreas Faerber:
* Fix compilation with tracing enabled.

Thanks! Fixes ticket #5188.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34860 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 18:26:43 +00:00
Adrien Destugues 6fc52a0c08 Updated lithuanian translations, done by Algirdas Buckus. Thanks !
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34859 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 17:11:30 +00:00
Fredrik Holmqvist 723fbad583 Substituted 'magic' subclass value (0x0) with it's definition PCI_vga for readability.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34858 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:33:44 +00:00
Stephan Aßmus 5d80127809 Patch by Andreas Faerber:
* Fix a typo in the comments: unintialized -> uninitialized.

Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34857 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:21:09 +00:00
Stephan Aßmus 745b2d9db7 Patch by Andreas Faerber:
* Fix duplicate assignment which is probably a merging artifact.

This patch was also a requirement for a working PPC KDL prompt. I didn't
apply the patches in order... Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34856 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:19:05 +00:00
Stephan Aßmus 16f50e3394 Patch by Andreas Faerber:
* Fix a warning in VM tracing output, which prevented the compilation since
   warnings are treated as errors.

Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34855 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:13:21 +00:00
Stephan Aßmus 352455f269 Patch by Andreas Faerber:
* The kernel's _start entry function expects now a second argument, the
   current CPU index. The PPC boot loader didn't initialize GPR4, passing
   its second argument, the kernel entry address, as CPU index, causing
   smp_cpu_rendezvous() to loop forever. This fix gets the PPC boot to a
   kernel debug prompt. The CPU index is currently fixed to 0.

Thanks a lot!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34854 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-02 10:09:09 +00:00