Commit Graph

67295 Commits

Author SHA1 Message Date
Augustin Cavalier
38210e8510 kernel/team: Minor code cleanup in LockTeamAndParent and LockTeamAndProcessGroup.
Make them look a bit more similar to each other.
No functional change intended.
2024-12-26 22:52:51 -05:00
Augustin Cavalier
da880bc23d kernel/vm: Correct check for other waiters.
Since in the case where we're being inserted last, otherWaiter == NULL.
2024-12-26 22:32:42 -05:00
Augustin Cavalier
36dfbcad11 kernel/fs: Set a minimum reserve in the path-name cache.
This cache is used for allocating typically ephemeral KPath buffers
for syscall handlers and the like. Letting it be drained to 0 by
the low resource system will just make future VFS syscalls needlessly
slower, so make sure that doesn't happen.
2024-12-26 21:41:27 -05:00
Augustin Cavalier
84ba9f198e packagefs: Use VM_PRIORITY_USER for reserving cache pages.
If it fails, we just fall back to uncached reading, so it's not
that important.
2024-12-26 21:40:10 -05:00
Augustin Cavalier
ef386dfe75 kernel/vm: Fix a race in reserve_pages.
See inline comment: it's possible to race with other threads
and wind up with pages if there are a lot of waiters or lock
contention. Just bail out and retry in that case.

The only other potential way to fix this I can think of would be to add a
read-write locking strategy; however this would still be prone to races,
since we acquire and release the lock in a loop in reserve_pages,
and keep whatever pages we managed to reserve from the last iteration.
2024-12-26 20:34:27 -05:00
Augustin Cavalier
f33f17f18e kernel/vm: Cleanups to reserve_pages.
* Rename "count" to "missing", makes clearer what it is and does.

 * Move a comment for clarity.

 * Remove an unnecessary Lock().
2024-12-26 20:34:27 -05:00
Augustin Cavalier
0008c79e56 kernel/vm: Implement AcquireUnreferencedStoreRef in VMAnonymousCache.
This is needed for the page writer to be sure it can do its job.
Fixes swap support after hrev58420 broke it.
2024-12-26 20:34:27 -05:00
Augustin Cavalier
593cb3a54d kernel/vm: Let higher-priority waiters steal lower-priority waiters' reservations.
This way, we don't wind up in a situation where there are dozens of
waiters, each needing a handful of pages, but each also having a
handful of pages already reserved, and everything deadlocks.

Significantly improves system responsiveness under high memory usage.
There's still more to be done, however.
2024-12-26 20:34:27 -05:00
Augustin Cavalier
c9fe6a1441 kernel/user_debugger: Remove declaration for _user_get_stack_trace.
The method itself was removed in 8f9d4cad45.
2024-12-26 20:34:27 -05:00
Augustin Cavalier
2d246d1be0 kernel/vm: Assert in reserve_memory that the amount is a multiple of B_PAGE_SIZE.
It doesn't make sense to reserve memory in other increments.

This would have caught #19295 earlier.

Also use PAGE_ALIGN in VMCache::SetMinimalCommitment.
2024-12-26 20:34:27 -05:00
Augustin Cavalier
8bb382decf kernel/vm: Drop vm_page_num_available_pages.
Nothing uses it, and it isn't correct anyway: vm_page_num_free_pages()
now includes cached pages, too, while vm_available_memory() includes
not just available memory pages but also swap.
2024-12-26 20:34:27 -05:00
Augustin Cavalier
a26220df71 kernel/vm: Use the correct PAGE_STATE for the queue count.
Avoids reserving data in the static area that we won't be using.
Also tweak one bit of coding style.
2024-12-26 20:34:27 -05:00
Augustin Cavalier
ec2f7c257b kernel/vm: Unreserve pages in bulk in VMCache::Delete and the MemoryManager.
Avoids extra wakeups when there are page reservation waiters.
Inspired by a patch from Jarek Pelczar, see #19034.
2024-12-26 20:34:26 -05:00
Augustin Cavalier
548202a11e kernel/vm: Actually increment the reservation count in page_free_etc.
The documentation comment claimed this was done but it actually wasn't,
potentially leading to leaks of pages. However, this method appears
to be passed reservation objects only in one rare case in vm_soft_fault
at present. In brief testing, I didn't manage to get that case to
happen.

This method will be used in more cases in future refactors, so it's
important it work correctly.
2024-12-26 20:34:26 -05:00
John Scipione
3c18c3d5c6 Tracker: Restore IsFiltering() to IsRefFiltering() or IsTypeAheadFiltering()
Add IsRefFiltering() and IsFiltering() is once again either kind
of filtering: ref or type-ahead.

Use IsRefFiltering() in a few places, otherwise use IsFiltering()
to restore filtering code so that it gets triggered on either kind
of filter.

Make the filtering methods inline to avoid function call overhead.

Fixes #19317

Change-Id: I27407ca33e8f2b967975c8a8ef8de83105442bd4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8715
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-12-26 22:10:31 +00:00
John Scipione
ffed6d0bff Tracker: 100 char style fixes to PoseView
Change-Id: Ife469064cd2e92e23da80849d4ba9f07936bf210
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8714
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-26 22:10:31 +00:00
JackBurton79
e4420b24eb Terminal: fixed possible memory leak on error.
Also add const to some methods

Change-Id: I6355a1f2f49ac6b819ff4c53983fce76119ed258
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8713
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-26 10:21:11 +00:00
JackBurton79
06fdc2e30f Terminal: Initialize fore and back color to sane defaults.
Fixes missing / random colors when using Terminal as replicant and does not have side effects

Change-Id: I839098cf95298c729eac9f68c4d6de9308a47d39
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8710
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-24 16:30:52 +00:00
PulkoMandy
a087f310d1 vesa: enable bios_patching by default on cards where it is known to work
Change-Id: If2da4847ab2a10fcae53472d7f863f5397cd2f07
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8633
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-12-24 09:48:00 +00:00
Augustin Cavalier
ce14c3c0f1 build: Remove the profile from the JAM_TARGETS.
The DefineBuildProfile logic implicitly removes it later on
when it replaces JAM_TARGETS entirely. But in some cases it
may not do that, and so if we want it to be removed in all cases,
we have to do that here.

Fixes commands like "jam -q -jN @nightly-anyboot haiku.hpkg"
giving a "don't know how to make @nightly-anyboot" message.
2024-12-23 15:54:49 -05:00
Augustin Cavalier
1aabdb2b8d build: De-indent CommandLineArguments.
If no targets are specified, exit with an error. But this should
never happen, since jam implicitly specifies "all" even if
nothing specific is given.
2024-12-23 15:52:30 -05:00
Augustin Cavalier
8b67e745eb build: Add check that a value was specified in SetConfigVar.
e.g. if one merely has "SetConfigVar DEBUG : HAIKU_TOP src system kernel ;"
this won't actually set a value for DEBUG, and thus it won't use one
of the pre-set debug objects directories, and so all the objects will
wind up in the root of wherever jam is run.
2024-12-23 15:33:03 -05:00
John Scipione
fdd7a7acf2 Network Status: Compose notification icon
... also in Media and Mail servers.

Change-Id: I9a95dc289446ba0dbf138e29cbd6d0b75e6b5ddc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8707
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-23 17:38:33 +00:00
John Scipione
7e317d9b51 Notifications: Compose size based on font size
Make arrow and close button size font-sensitive.

Compose default window width based on font size.

Eliminate kCloseSize, kEdgePadding, kSmallPadding, kExpandSize
and kPenSize.

Eliminate NotificationView::_DrawCloseButton() in favor of calling
AppGroupView::DrawCloseButton().

AppGroupView::CloseButtonSize() method used in NotificationView.

Eliminate IconSize() from window and view parameter, get icon (and size)
from notification in the view.

Only move text down a line if title is set.

Change-Id: I53654c117bee634d3d8bddf6bf766577bd55b9a3
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8706
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-23 17:38:33 +00:00
Niklas Poslovski
2705a2ae66 Media: Improve readability of label in AudioMixer using mix_color
Part of #18970

Change-Id: I98b13103ffffba129b45357d78ec49b7c21ad827
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7947
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-12-23 10:24:37 +00:00
John Scipione
8e29e4e3e3 Tracker: Change "multiple selections" => "# selected" in Find window
... for example "2 selected" instead of "multiple selections".
Set minimum volume menu field width to "99 selected".

Refactor ShowVolumeMenuLabel() to have multiple selections once.

Change-Id: I5a2126972d3b93e7dd98ca631606302a59546f53
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8151
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-12-23 09:44:41 +00:00
Pascal Abresch
059a86da75 Appearence: remove dead code from FontPreferences
No functional change Intended

Change-Id: I1c61f5d0ed30678bce1d94feda8e0cd3744ab51e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8430
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-12-23 09:42:14 +00:00
Alexander von Gluck
796bd00681 network/route: accept an empty network address as the destination.
* linux + BSD accept 0.0.0.0 or :: as the default route identifier
* openvpn passes 0.0.0.0 as the default route
* our own route command shows "0.0.0.0" for the default route

Lets not be special here, and do what everyone else does. default
still works for backwards compat.

This uncovered a potental bug in BNetworkAddress. See #19296

Change-Id: I3aea99cae4cf9c52142cb97e2a06b8432de294b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8592
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Alexander von Gluck <alex@terarocket.io>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
2024-12-23 09:38:36 +00:00
Pascal Abresch
3b8cfd27cc mail_daemon: Error log improvements
This should fix the colors in the dark mode, and will also properly size the scrollbar

The initial window is still quite small however, and skips deskbar.

Change-Id: I9181095cd44cc2b24cddcbd96754fb04a7ac2cfd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/7882
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
2024-12-22 19:30:53 +00:00
John Scipione
4b27f67f1a Appearance: Redo FontSelectionView to update text color
FontSelectionView was not getting added to the view hierarchy and
thus was not receiving the B_COLORS_UPDATED message when the colors
changed. This was because we wanted to build the grid all at once.
Instead build the grid inside each of the FontSelectionView's and
set the first column to the longest string afterwords so everything
lines up.

This updates the text view colors when the font changes. The rest
of the changes are to fix the view hierarchy so that we don't need
to explicitly call MessageReceived() on the FontSelectionView to
get receive B_COLORS_UPDATED.

Change-Id: Ice6ff0b8a95d522c9994b6b873fac10cf5f71ea4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8246
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-12-22 19:22:44 +00:00
John Scipione
c7c5de0f79 Appearance: Use BLayoutBuilder instead of BGroupLayoutBuilder
Rename GetPreviewBox() to just PreviewBox() matching WebPositive.

Change-Id: I378a76bc3d2742273cb5cfad4863e377103786cd
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8245
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-12-22 19:22:44 +00:00
PulkoMandy
1b6f159e88 neomagic: enable -Werror, fix compiler warnings
Change-Id: I176a316c6cb18d3684cf6166c4a2fe74f816d0d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8702
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-12-22 14:27:47 +00:00
PulkoMandy
1fd7b2f396 3dfx driver: enable -Werror and fix warnings
Change-Id: I8278dab0456dbad86c27e483fcb91a9c21d3f517
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8701
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-12-22 14:27:47 +00:00
cafeina
102726ea26 Haiku Book: Added GameSound, Shelf
Change-Id: I1377ab80e7128a5406bf9f0523564e5e7f9e9f1b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8624
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-12-22 08:40:35 +00:00
PulkoMandy
a4d7ac5b5f ArchitectureRules: enable -Werror for more video drivers
Change-Id: I446716f1b767f390dc589715f8bd41f50de325f2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8699
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-12-22 08:38:02 +00:00
PulkoMandy
3b119ad9e1 ps2: check error bit behavior before enabling active multiplexing
The synaptics specification changes the meaning of the system bit when
there is incoming data from the AUX (mouse) port, to indicate that the
incoming byte is an error. This also allows to detect if the active
multiplexing is not enabled correctly or has been reset.

Use this as an additional check so that active multiplexing is disabled
on my laptop, where it doesn't work.

Keeps #19266 fixed while avoiding the long timeout on my machine.

Change-Id: Ia8277e135a149cfa25a2a3022c87c3e05aacb6d5
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8632
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-12-22 08:34:43 +00:00
John Scipione
512a94bc18 BTextView docs: Document GetFontAndColor() and SetFontAndColor()
Change-Id: Ie284c63690e955d7cfae7e9e66949a63205e8e31
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8270
Reviewed-by: nephele nephele <nep-git@packageloss.eu>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
2024-12-21 17:32:52 +00:00
Augustin Cavalier
5ac9e49426 SCSI: Ensure the condition variable is idle before freeing the CCB.
If the completion was just notified by another thread, it's possible
we were awoken and are trying to free this CCB before the other thread
released the condition variable's lock. So, call NotifyAll again
to serialize.

Should fix #17522.
2024-12-21 12:18:22 -05:00
Augustin Cavalier
18443c583a Drivers.h: Add B_SOCKET_IO_BASE declaration.
All the SIO... codes are in the 8900 range.

Change-Id: I7b319877d2430eba2573a0c8fd68cb7fc3b221d8
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8693
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-21 17:00:00 +00:00
PulkoMandy
1ad0f6ade6 via graphics: fix compiler warnings
Change-Id: I4ac406b2024acc85feff41c2c702b1ba49fca1fb
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8698
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-21 15:26:23 +00:00
PulkoMandy
63c2738059 radeon: fix compiler warnings
Change-Id: I952abcec52bd00a05193cf4a96b1b2a63947080c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8697
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-21 15:26:23 +00:00
PulkoMandy
e0d66c025d nvidia: fix compiler warnings
Change-Id: I49acd914c2f0a67dc2f4cbe7abd0ee0111db5309
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8696
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-21 15:26:23 +00:00
PulkoMandy
bed6017a15 matrox: fix compiler warnings
Change-Id: I5dce7230fcf5098bd361b459fc77e2be0af4f5d2
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8695
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-21 15:26:23 +00:00
PulkoMandy
53143b25da hda: missing const
Change-Id: I0af1c02beaa18a7a0b17cf76632abde96685895e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8694
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-21 15:26:23 +00:00
Lt-Henry
d3f6f52ffc intel graphics: Added new device
Added the ID for Haswell ULT GT3 Mobile, also known as Iris 5100

Change-Id: If340b0ce200b385ddd8ec4f0f03cf2f1ae450cd4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8700
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-12-21 12:40:19 +00:00
Autocomitter
978a931ea9 Update translations from Pootle 2024-12-21 08:10:01 +00:00
Anarchos
4d3a68fb7d netboot: bump size for tar decompression
Add network add-ons drivers to the archive for x86_64 architecture too.

Change-Id: I8296586d5f2b1f3d4c08250e28aefd32428b21b9
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8522
Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Adrien Destugues <pulkomandy@pulkomandy.tk>
2024-12-21 07:46:10 +00:00
Augustin Cavalier
d40db83a6c kernel/vm: Clean up vm_clone_area (and wait_if_address_range_is_wired).
* Put variable declarations near use.

 * Use AreaCacheLocker, which calls vm_area_get_locked_cache for us.

 * De-branchify now that a Locker is being used.

No functional changes intended.
2024-12-20 16:02:05 -05:00
Augustin Cavalier
2f7bf3b339 virtio_net: Don't print a message on SIOCGIFSTATS.
Fixes #19304, reduces syslog spam.

Change-Id: I219709645d516134f0e4948e662bd90ee00ab183
Reviewed-on: https://review.haiku-os.org/c/haiku/+/8692
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
2024-12-20 16:22:51 +00:00
Augustin Cavalier
01e97ff280 KPartition: Drop SetParent().
A comment indicated it "must" only be called in Add/RemoveChild only.
So the field is just modified there now.
2024-12-19 17:21:04 -05:00