History log of /haiku/src/system/kernel/fs/EntryCache.cpp (Results 1 – 14 of 14)
Revision Date Author Comments
# ab4fc434 10-Sep-2024 Augustin Cavalier <waddlesplash@gmail.com>

EntryCache: Cache the entry's hash value.

EntryCacheEntry was padded out to 40 bytes, so this doesn't increase
its size (on 64-bit platforms).

Also increase entriesSize to actually be a power of 2.

EntryCache: Cache the entry's hash value.

EntryCacheEntry was padded out to 40 bytes, so this doesn't increase
its size (on 64-bit platforms).

Also increase entriesSize to actually be a power of 2.

This saves us a string comparison when the hashes don't match.
It saved around ~1400 such string comparisons during a boot, and then
rebuilding HaikuDepot, it saved around ~10,000 (both numbers after
factoring in the hashes that compared equal but the directory
values differed, as we skip the string comparisons in that case too.)

Time to compile HaikuDepot seems slightly improved, on average.

show more ...


# b8a2c909 10-Sep-2024 Augustin Cavalier <waddlesplash@gmail.com>

EntryCache: Use memcpy to copy the strings.

We already use strlen() once, we might as well cache that result
and then use memcpy() instead of strcpy().


# abc06f6b 07-Sep-2024 Jarosław Pelczar <jarek@jpelczar.com>

EntryCache::Add: Avoid potential deadlock when waiting for memory

If system RAM is very low, avoid potentially long waiting for entry
cache to be populated. If entry couldn't be cached, nothing seri

EntryCache::Add: Avoid potential deadlock when waiting for memory

If system RAM is very low, avoid potentially long waiting for entry
cache to be populated. If entry couldn't be cached, nothing serious
is going to happen.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>

show more ...


# 97f11716 04-Sep-2022 Niels Sascha Reedijk <niels.reedijk@gmail.com>

Merge remote-tracking branch 'origin/master' into dev/netservices

Change-Id: I588c4a840523995f820161d63741c137bc5c719c


# 8016c5b7 04-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

kernel/fs: Add missing initializations to EntryCache.

Should fix #17857.


# e83979af 03-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

kernel/fs: Larger sizes for EntryCache if there is >= 1GB RAM available.

Instead of 8096 maximum entries, now there will be about 130k.
As there are around ~32k files in the Haiku git tree, this has

kernel/fs: Larger sizes for EntryCache if there is >= 1GB RAM available.

Instead of 8096 maximum entries, now there will be about 130k.
As there are around ~32k files in the Haiku git tree, this has a
serious impact on "git status" performance: in my testing it sped up
from around 0.95s to 0.39s, or less than half with a "hot" cache
(in a VM backed by an NVMe SSD, may be more dramatic on spinning system.)

Compile performance does not seem very much improved, however.

show more ...


# 3a19a89f 03-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

kernel/fs: Fix generation reference in EntryCache.

We are trying to add the enty to the current generation, so we
need to use the current generation's next_index, not the previous.
This was apparent

kernel/fs: Fix generation reference in EntryCache.

We are trying to add the enty to the current generation, so we
need to use the current generation's next_index, not the previous.
This was apparently broken since this code was imported. The "miss"
here meant we always acquired the write-lock and then ran the more
expensive add operation, which performs this same check (correctly).

Slight performance improvement seen in basic testing, but nothing
too drastic.

show more ...


# 25866ebe 03-Aug-2022 Augustin Cavalier <waddlesplash@gmail.com>

kernel/fs: Refactor EntryCache to not use constant array sizes.

Instead set them in the Init functions. For now, the same
hard-coded sizes are used, so aside from slightly increased storage
on two c

kernel/fs: Refactor EntryCache to not use constant array sizes.

Instead set them in the Init functions. For now, the same
hard-coded sizes are used, so aside from slightly increased storage
on two classes (or not even due to padding), this has no functional change.

show more ...


# efb0a3a8 17-Aug-2015 Michael Lotz <mmlr@mlotz.ch>

EntryCache: Add entry_cache_add_missing() for negative caching.

It provides a way for filesystems to cache a lookup failure and
therefore prevents repeated lookups of missing entries. This is a
comm

EntryCache: Add entry_cache_add_missing() for negative caching.

It provides a way for filesystems to cache a lookup failure and
therefore prevents repeated lookups of missing entries. This is a
common scenario for example in command lookup and compiling, where
each directory in PATH or each include directory is searched for the
given entry.

show more ...


# d0f2d828 17-Jan-2014 Pawel Dziepak <pdziepak@quarnos.org>

Merge branch 'scheduler'

Conflicts:
build/jam/packages/Haiku
headers/os/kernel/OS.h
headers/os/opengl/GLRenderer.h
headers/private/shared/cpu_type.h
src/add-ons/kernel/drivers/power/acpi_batter

Merge branch 'scheduler'

Conflicts:
build/jam/packages/Haiku
headers/os/kernel/OS.h
headers/os/opengl/GLRenderer.h
headers/private/shared/cpu_type.h
src/add-ons/kernel/drivers/power/acpi_battery/acpi_battery.h
src/bin/sysinfo.cpp
src/bin/top.c
src/system/kernel/arch/x86/arch_system_info.cpp
src/system/kernel/port.cpp

show more ...


# 077c84eb 05-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: atomic_*() functions rework

* No need for the atomically changed variables to be declared as
volatile.
* Drop support for atomically getting and setting unaligned data.
* Introduce ato

kernel: atomic_*() functions rework

* No need for the atomically changed variables to be declared as
volatile.
* Drop support for atomically getting and setting unaligned data.
* Introduce atomic_get_and_set[64]() which works the same as
atomic_set[64]() used to. atomic_set[64]() does not return the
previous value anymore.

show more ...


# 83291a2a 26-Feb-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Added DebugReverseLookup() method to reverse-lookup directory and entry name
for a given vnode (for debugging purposes).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35625 a95241bf-73f2-0310

Added DebugReverseLookup() method to reverse-lookup directory and entry name
for a given vnode (for debugging purposes).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35625 a95241bf-73f2-0310-859d-f6bbb57e9c96

show more ...


# 1b1b94b8 08-Jan-2010 Ingo Weinhold <ingo_weinhold@gmx.de>

Entry cache:
* Moved hash computations out of the critical sections.
* Replaced the LRU entry queue by an array of entry "generations", each
containing a sparse array of entries of that generation.

Entry cache:
* Moved hash computations out of the critical sections.
* Replaced the LRU entry queue by an array of entry "generations", each
containing a sparse array of entries of that generation. Whenever a
generation is full, we clear the oldest generation and continue with that
one. The main advantage of this algorithm is that entry cache's mutex could
be replaced by an r/w lock, that most of the time only has to be read
locked in Lookup(). This does dramatically decrease contention of that
lock.

The total -j8 Haiku image build speedup is marginal, but the kernel time
drops about 7% (now being smaller than the real time).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34950 a95241bf-73f2-0310-859d-f6bbb57e9c96

show more ...


# 71cc4d49 01-Sep-2015 Julian Harnath <julian.harnath@rwth-aachen.de>

Merge branch 'master' into app_server

Conflicts:
src/kits/app/Roster.cpp