Commit Graph

33299 Commits

Author SHA1 Message Date
Ingo Weinhold
fb1819be95 Eliminated sVnodeCoveredByMutex. The Vnode::covered_by field is now also
protected by the global vnodes lock. The contention mostly moves to other
locks, though. The total -j8 Haiku image build time is only reduced
minimally.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34938 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 17:01:27 +00:00
Ingo Weinhold
bd0bff449f Changed sAreaCacheLock from mutex to rw_lock. This reduces the lock's
contention about two orders of magnitude. Most of it seems to be taken over
by other locks, though. Yields only small improvements for the -j8 Haiku
image build.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34937 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 15:36:18 +00:00
Ingo Weinhold
77690f288e Added VMCache::SwitchFromReadLock(), atomically unlocking a read lock and
starting to lock the cache.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34936 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 15:32:28 +00:00
Ingo Weinhold
c4f9831292 Added new mutex_switch_from_read_lock() for unlocking a read lock and
starting to lock a mutex in an atomic operation.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34935 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 15:31:29 +00:00
Ingo Weinhold
8ab820f076 VMAddressSpace::Put() is too hot to always write lock the address spaces
table. It is now inline and uses double-checked locking. This reduces the
contention on the lock to insignificant. Total -j8 Haiku image build speedup
is marginal, but the total kernel time drops 12%.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34934 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 14:09:56 +00:00
Ingo Weinhold
3cd2094396 * Added new debug feature (DEBUG_PAGE_ACCESS) to detect invalid concurrent
access to a vm_page. It is basically an atomically accessed thread ID field
  in the vm_page structure, which is explicitly set by macros marking the
  critical sections. As a first positive effect I had to review quite a bit of
  code and found several issues.
* Added several TODOs and comments. Some harmless ones, but also a few
  troublesome ones in vm.cpp regarding page unmapping.
* file_cache: PrecacheIO::Prepare()/read_into_cache: Removed superfluous
  vm_page_allocate_page() return value checks. It cannot fail anymore.
* Removed the heavily contended "pages" lock. We use different policies now:
  - sModifiedTemporaryPages is accessed atomically.
  - sPageDeficitLock and sFreePageCondition are protected by a new mutex.
  - The page queues have individual locks (mutexes).
  - Renamed set_page_state_nolock() to set_page_state(). Unless the caller says
    otherwise, it does now lock the affected pages queues itself. Also changed
    the return value to void -- we panic() anyway.
* set_page_state(): Add free/clear pages to the beginning of their respective
  queues as this is more cache-friendly.
* Pages with the states PAGE_STATE_WIRED or PAGE_STATE_UNUSED are no longer
  in any queue. They were in the "active" queue, but there's no good reason
  to have them there. In case we decide to let the page daemon work the queues
  (like FreeBSD) they would just be in the way.
* Pulled the common part of vm_page_allocate_page_run[_no_base]() into a helper
  function. Also fixed a bug I introduced previously: The functions must not
  vm_page_unreserve_pages() on success, since they remove the pages from the
  free/clear queue without decrementing sUnreservedFreePages.
* vm_page_set_state(): Changed return type to void. The function cannot really
  fail and no-one was checking it anyway.
* vm_page_free(), vm_page_set_state(): Added assertion: The page must not be
  free/clear before. This is implied by the policy that no-one is allowed to
  access free/clear pages without holding the respective queue's lock, which is
  not the case at this point. This found the bug fixed in r34912.
* vm_page_requeue(): Added general assertions. panic() when requeuing of
  free/clear pages is requested. Same reason as above.
* vm_clone_area(), B_FULL_LOCK case: Don't map busy pages. The implementation is
  still not correct, though.

My usual -j8 Haiku build test runs another 10% faster, now. The total kernel
time drops about 18%. As hoped the new locks have only a fraction of the old
"pages" lock contention. Other locks lead the "most wanted list" now.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34933 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 02:37:05 +00:00
Michael Lotz
c1f316db61 When canceling the transfer, the callback is still called, just with the
canceled status, so we need to collect the corresponding sem release. Otherwise
we would run directly into the old cancel status the next time we schedule.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34932 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 02:21:31 +00:00
Stephan Aßmus
dfddb9f479 * Optionally use libswscale for color space conversion. Have not done any
performance tests, but I wrote this code before David got around to improve
   his color space assembler code and didn't want to throw it away. Turned
   off for the time being, since David's version works fine.
 * Supply a codec sub_id in the media_codec_info. This allows matching
   decoders to encoders, which comes in handy for Smart Rendering in Clockwerk.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34931 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 01:18:32 +00:00
Stephan Aßmus
856d0bbf95 Disabled tracing.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34930 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 01:14:44 +00:00
Stephan Aßmus
59ec4d2f76 * Disabled tracing.
* Use the configured source color space when converting instead of hardcoding
   B_RGB32. (Resolved TODO)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34929 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 01:14:20 +00:00
Stephan Aßmus
f947df7ded Slightly more precise calculations in finding keyframes/seeking.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34928 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 01:12:47 +00:00
Stephan Aßmus
79d332bbfe Missed this in my diff. Somewhat important to make Matroska container work.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34927 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 01:11:12 +00:00
Stephan Aßmus
2a0cb284c4 Added utility function colorspace_to_pixfmt().
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34926 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 01:10:28 +00:00
Stephan Aßmus
ead6198972 Enable Matroska container for testing purposes.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34925 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 01:08:43 +00:00
Stephan Aßmus
9ea74f6c0b It's late, forgot to remove debugging output...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34924 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 00:56:51 +00:00
Stephan Aßmus
3a57be2aea * Indentation and naming cleanup in the header
* Small coding style cleanups in the .cpp
 * When reading raw chunks, keep fCurrentFrame updated anyway
 * When decoding frames and chunks, don't change the meaning of fCurrentTime,
   it's supposed to be the start time of the next chunk/frame, same as
   CurrentFrame(), not the time of the frame/chunk we just decoded/read.
   BMediaTrack::CurrentFrame() is actually documented like this in the BeBook,
   but CurrentTime() is not. However, when seeking to a specific time, it is
   understood that this is the time of the next frame/chunk. If we decode/read
   it and set fCurrentTime to the start_time as specified in the media_header,
   it would actually not change for the first frame/chunk after seeking.
   To be able to know the duration of chunks, fWriterFormat had to be changed
   to just fFormat and is now used for decoding as well.
* Simplified handling of media_header in some methods, saves one assignment.

These changes are not so well tested, yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34923 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 00:55:55 +00:00
Michael Lotz
40d3e7158f Whitespace cleanup, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34922 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-07 00:13:03 +00:00
Adrien Destugues
a88df561df - Fix some lithuanian translations
- Some of them were also missing from the jamfiles


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34921 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-06 20:59:24 +00:00
François Revol
cecee6bb75 M is 1024*1024, dammit ! Has the US finally switched to the metric system ?
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34920 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-06 18:15:56 +00:00
Stephan Aßmus
9149b4aa35 Fixed line-endings.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34919 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-06 17:54:21 +00:00
Stephan Aßmus
7c5a2487c1 Patch by Andreas Faerber:
* Fixed coding style issues pointed out by Axel.
 * Fixed potential buffer overflow and fault in default-client-up code path
   (OF counts terminating zero char, too).
 * Added an intermediate fallback to parsing the boot path
 * Added himself to the copyright holders

Thanks a lot! Fixes ticket #5189.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34918 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-06 17:53:03 +00:00
François Revol
bc85c20bdd - add board-specific stuff to header paths,
- automatically download the u-boot flash image when set.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34917 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-06 17:47:54 +00:00
Michael Lotz
5926a6129f I don't know why this was disabled, but not canceling the queued transfers after
a timeout leaks these transfers. In the end this would at least lead to a flood
of canceled transfers on device unplug or, worse yet, exhaust the USB memory
pool stalling all further transfers as seen in #4604. Probably fixes both
issues, can't test though as I don't have the hardware.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34915 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-06 00:54:15 +00:00
Michael Lotz
cb3d173dc2 Whitespace cleanup only, no functional change.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34914 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-06 00:48:13 +00:00
Ingo Weinhold
66896bba13 RemovePage() + InsertPage() == MovePage()
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34913 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 22:04:24 +00:00
Ingo Weinhold
cb8617c1d4 unmap_and_free_physical_pages(): Added missing check whether the page
mapping is actually present. This would have resulted in page 0 being freed
over and over again, if we hadn't also incorrectly tried to look up the page
by the virtual instead of the physical address. So we were actually freeing
random pages. Fortunately the virtual addresses are kernel addresses, so that
the affected pages lay beyond 2 GB and probably weren't used at this point
yet.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34912 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 22:02:58 +00:00
Adrien Destugues
2a857080f5 Fix french catalog for zipomatic. A blank translation was in the file (last line), which is not allowed.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34911 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 19:19:11 +00:00
Adrien Destugues
0bedbad9bf -Add french translation for zipomatic, done with Travis amazing tool.
-Fixup russian translation of keymap (wrong mimetype)


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34910 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 19:08:24 +00:00
Axel Dörfler
b2397539da * BFS now correctly reports the B_FS_HAS_QUERY flag (ie. if you disable the
indices it will no longer be set).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34909 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 17:37:33 +00:00
Stephan Aßmus
035cb25ef2 * Simplify the interface layout (don't use struts for the purpose of item
spacing and insets).
* Added a check box for disalbling the index generation on BFS volumes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34908 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 17:26:48 +00:00
Oliver Tappe
100418b654 * updated rsync optional package (now with xattr support)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34907 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 17:13:33 +00:00
Axel Dörfler
f0a1eb2dba * The static object construction and destruction is no longer random, but takes
the internal dependencies into account. This should fix bugs #5166, #5120,
  and #5150.
* Also, the time source object manager, as well as the dormant node manager
  are now recreated on media roster restart (when the media server is
  restarted).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34906 a95241bf-73f2-0310-859d-f6bbb57e9c96
2010-01-05 16:53:55 +00:00
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