vm_remove_all_page_mappings() all computed the wrong virtual address for the
page in question, and would therefore return incorrect data!
Introduced a virtual_page_address() function that is now used by all of them.
So that's why we were still "losing" modified flags - it took me some hours
to find those (sometimes processes died after stealing pages)...
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22498 a95241bf-73f2-0310-859d-f6bbb57e9c96
it intended to. That resulted in more writable pages where you wouldn't want
them (ie. allowing the area to change pages in lower caches).
* We were losing modified pages: vm_unmap_pages() sometimes has to preserve
the modified flag (eg. when called from page fault).
* Both of these were responsible that stealing active pages would crash
applications - even if less likely, this could also have happened when
stealing inactive pages. Therefore, I've activated stealing active pages
again.
* The page writer now pushes the pages of busy vnodes to the end of the queue,
so that it won't pick them up again too soon (the vnode destruction would
be in the process of writing those pages back, anyway).
* The page thief now triggers the page writer to run once it has to steal
active pages. This might be a bit too aggressive, though.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22495 a95241bf-73f2-0310-859d-f6bbb57e9c96
pages to reserve, which could result in to few being reserved in certain
situations.
* Use MutexLocker where appropriate.
* Reordered includes following the new rules.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22494 a95241bf-73f2-0310-859d-f6bbb57e9c96
* uname() now calls gethostname() instead of using a hard-coded value.
* This fixes bug #1250.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22492 a95241bf-73f2-0310-859d-f6bbb57e9c96
the blue screen was initialized - blue_screen_enter() now returns wether
or not it has been initialized already (there will only be serial output
in that case).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22491 a95241bf-73f2-0310-859d-f6bbb57e9c96
hence CancelInputMethod()), but it implements part of it. To avoid code
duplication, I added a private _SetRunArray() call, which does most of
the work, except cancelling the input method, and calling Refresh().
Removed some unneeded code from CancelInputMethod(), some small changes
in HandleInputMethodChanged.
-Questa linea, e quelle sotto di essa, saranno ignorate--
M src/kits/interface/TextView.cpp
M headers/os/interface/TextView.h
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22489 a95241bf-73f2-0310-859d-f6bbb57e9c96
Alternatively, we could add an inputrc file - this would have the advantage
that other apps using readline built-in would have those, too.
OTOH this really should be in the defaults, too, IMO (ie. we could do both).
Opinions welcome :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22488 a95241bf-73f2-0310-859d-f6bbb57e9c96
* The page_thief() will no longer steal any pages in B_LOW_MEMORY_NOTE state,
only in the more serious cases.
* I've disabled stealing active pages for now again; there seem to be some
problems with it (either with how we do it, or with other stuff).
* vm_page_schedule_write_page() now always releases the page writer semaphore,
resulting in many more written pages - this isn't optimal as long as there is
no I/O scheduler, but before it was much too rare when there are many dirty
pages.
* Customized the thread priorities a bit to make the page scanner/thief/writer
experience a bit nicer with our current scheduler.
* vm_page_reserve_pages() would return too early, it did not test if really
enough pages are free.
* Under certain circumstances, the wakeup from vm_page_reserve_pages() did not
work - we now always notify in vm_page_unreserve_pages() to work around that
problem.
* Checked if the page reservations are done when needed and are always balanced
for the whole kernel.
* vm_page_allocate_page() now panics if it can't deliver a reserved page.
* vm_page_allocate_page_run() can no longer steal reserved pages.
* With all of those changes, I could finally copy a file in emulation, ie. the
Luposian bug should finally be fixed, even though the system might still not
be perfectly stable under low memory. Will do some more testing.
* write_page() no longer prints something on failure.
* Dumping a whole page queue will now also write the cache type of each page.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22486 a95241bf-73f2-0310-859d-f6bbb57e9c96
busy vnodes.
* dir_create_entry_ref() used get_vnode() incorrectly (and could therefore
potentially prevent a file system from doing proper locking when called
from the kernel).
* The vnode_store now uses this for its acquire_unreferenced_ref()
implementation (and therefore for the page writer).
* read_into_cache() and write_to_cache() were still marked inline.
* The system will now wait 10 secs for a busy vnode before returning an error.
* It will also no longer panic in that case.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22485 a95241bf-73f2-0310-859d-f6bbb57e9c96
* vm_low_memory_state() now periodically recomputes the state in case the
low memory thread is waiting for something.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22483 a95241bf-73f2-0310-859d-f6bbb57e9c96
functionality of the kernel add-ons will be moved into userland, which
will simplify the kernel-side significantly.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22481 a95241bf-73f2-0310-859d-f6bbb57e9c96
We actually need to fail for sockets, too, but until I'm mistaken, we
can't identify them in the VFS. Fixes bug #1539.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22480 a95241bf-73f2-0310-859d-f6bbb57e9c96
problem of BMenuItem::SetTrigger() that got fixed in r22476 (see bug #1506 for
the details).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22477 a95241bf-73f2-0310-859d-f6bbb57e9c96
additional partition_data* child parameter now.
* _user_get_partitionable_spaces() doesn't need to copy the buffer into
the kernel, since it is no input parameter. It also copies back the
actual partitionable spaces count on error, now -- B_BUFFER_OVERFLOW
is returned when the buffer was too small, but then the count must be
returned too.
* Fixed several instances of syscall implementations that unloaded a disk
system, although they didn't load it in the first place. This screwed
up the load count with undesirable consequences.
* _user_create_child_partition() would set the size to the supplied
offset.
* Fixed broken loop in KPhysicalPartition::CreateShadowPartition().
* KPartition::RemoveChild() notified the listeners about the wrong
event.
* Intel partitioning module:
- The *_get_partitionable_spaces() correctly return B_BUFFER_OVERFLOW
now, if the supplied buffer is too small.
- Implemented a part of pm_shadow_changed(), which creates and updates
the PartitionMap, so that the validate_*() hooks have a chance to
work at all.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22475 a95241bf-73f2-0310-859d-f6bbb57e9c96
but it is mandatory to the KDiskSystem::ValidateCreateChild(), which is
invoked, so we need to use a stack variable.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22473 a95241bf-73f2-0310-859d-f6bbb57e9c96
physical partition, unlike get_partition() which returns the shadow
partition, if it exists.
* Added B_PARTITION_SHADOW[_CHILD] partition pseudo operation values for
the shadow_changed() hook, notifying a disk system, that a shadow
partition has been created.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22472 a95241bf-73f2-0310-859d-f6bbb57e9c96
BPartition structure with the data retrieved from the kernel. For new
partitions the field is not set in the next step and later code would
use an initialized pointer.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22471 a95241bf-73f2-0310-859d-f6bbb57e9c96
parent (not the child) partition, now. A method with the old semantics
is probably needed, too, but before creating a child partition, one
obviously doesn't have a child to pass yet.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22469 a95241bf-73f2-0310-859d-f6bbb57e9c96
allocate with the vm_cache locked - this is necessary to be able to steal pages
from itself (large files...).
The system doesn't actually lock up anymore, but it still renders itself unusable;
obviously the page thief does not work correctly, yet. The rest of the experience
is created by our current scheduler (the page thief runs and runs, but it doesn't
free any pages anymore).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22466 a95241bf-73f2-0310-859d-f6bbb57e9c96
twice into the same cache: cache_io() called read_into_cache() (or
write_to_cache()), and that broke down the request into smaller parts.
It then called read_chunk_into_cache() (or write_chunk_to_cache() resp.)
to actually allocate pages and fulfill the request.
However, it needed to unlock the cache for each chunk, and in the mean
time someone else could insert pages into the remaining chunks.
* Now, cache_io() already takes care of chunking the data which makes this
approach safe, and also simplified the code a bit - read_into_cache()/
write_to_cache() are gone now. I've renamed read_chunk_into_cache() to
read_into_cache() (same for the write function).
* Also got rid of that goto in that function while I was on it.
* Disabled cache_prefetch_vnode() for now (it's similar to cache_io(), but
since it's currently not used [since no cache module is installed yet],
I didn't want to go through updating it now, too).
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22465 a95241bf-73f2-0310-859d-f6bbb57e9c96
* his has to be used by the page writer to make sure the vnode is still valid.
* This should have been the final nail on the Luposian bug - I haven't tested
it yet, but we'll certainly see :-)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22462 a95241bf-73f2-0310-859d-f6bbb57e9c96
Current status : playback only.
Support for M-Audio Delta 1010, Delta 1010 LT, Delta DIO 2496, Delta 66, Delta 44, Audiophile 2496 and Delta 410 VX 442.
Tested on M-Audio Audiophile2496.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22458 a95241bf-73f2-0310-859d-f6bbb57e9c96
heap is going away soon, it doesn't hurt to have it in the repository.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22457 a95241bf-73f2-0310-859d-f6bbb57e9c96
interfere with the page thief, we always need to have reserved a page for
this upfront. I introduced a function to the vm_translation_map layer that
estimates how much pages a mapping might need at maximum. All functions that
map a page now call this and reserve the needed pages upfront.
It might not be a nice solution, but it works.
* The page thief could run into a panic when trying to call vm_cache_release_ref()
on a non-existing (NULL) cache.
* Also, it will now ignore wired active pages.
* There is still a race condition between the page writer and the vnode
destruction - writing a page back needs a valid vnode, but that might just
have been deleted.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22455 a95241bf-73f2-0310-859d-f6bbb57e9c96
mjw for the hint. Fixes bug #1516.
* Changed _{kern,user}_create_symlink() to no longer check the supplied
link string. BeOS seems to do that, but this is not standard
conforming. The previous implementation even used the path processed
by check_path(), which would potentially have appended a ".".
* Some style cleanup.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22451 a95241bf-73f2-0310-859d-f6bbb57e9c96