On Wed Apr 12 12:09:30 2023 +0000, **** wrote:
> Marvin replied on the mailing list:
> ```
> Hi,
> It looks like your patch introduced the new failures shown below.
> Please investigate and fix them before resubmitting your patch.
> If they are not new, fixing them anyway would help a lot. Otherwise
> please ask for the known failures list to be updated.
> The tests also ran into some preexisting test failures. If you know how
> to fix them that would be helpful. See the TestBot job for the details:
> The full results can be found at:
> https://testbot.winehq.org/JobDetails.pl?Key=131819
> Your paranoid android.
> === debian11 (32 bit report) ===
> ntdll:
> directory.c:164: Test failed: file L".": expected (null) (10), got 12
> directory.c:164: Test failed: file L"..": expected (null) (10), got 12
> === debian11 (32 bit zh:CN report) ===
> ntdll:
> directory.c:164: Test failed: file L".": expected (null) (10), got 12
> directory.c:164: Test failed: file L"..": expected (null) (10), got 12
> === debian11b (64 bit WoW report) ===
> ntdll:
> directory.c:164: Test failed: file L".": expected (null) (10), got 12
> directory.c:164: Test failed: file L"..": expected (null) (10), got 12
> ```
will fix
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1148#note_29753
Currently, the free list consists of a "small list" for sizes below 256,
which are linearly spaced, and a "large list" which is manually split
into a few chunks.
This patch replaces it with a single log-linear policy, while expanding
the range the large list covers.
The old implementation had issues when a lot of large allocations
happened. In this case, all the allocations went in the last catch-all
bucket in the "large list", and what happens is:
1. The linked list grew in size over time, causing searching cost to
skyrocket.
2. With the first-fit allocation policy, fragmentation was also making
the problem worse.
The new bucketing covers the entire range up until we start allocating
large blocks, which will not enter the free list. It also makes the
allocation policy closer to best-fit (although not exactly), reducing
fragmentation.
The increase in number of free lists does incur some cost when it needs
to be skipped over, but the improvement in allocation performance
outweighs it.
For future work, these ideas (mostly from glibc) might or might not
benefit performance:
- Use an exact best-fit allocation policy.
- Add a bitmap for freelist, allowing empty lists to be skipped with a
single bit scan.
For the benchmark, this drastically improves initial shader loading performance in Overwatch 2. In this workload 78k shaders are passed to DXVK for DXBC -> SPIRV translation, and for each shader a few allocation happens in the 4K – 100K range for the staging buffer.
Before this patch, malloc consisted a whooping 43% of overhead. The overhead with log-linear bucketing is drastically lower, resulting in a ~2x improvement in loading time.
Overhead for each `FREE_LIST_LINEAR_BITS` is as below:
- 0: 7.7%
- 1: 2.9%
- 2: 1.3%
- 3: 0.6%
Since performance seems to scale linearly with increase in buckets (up to the point I have tested), I've opted for 3 (8 buckets per doubling) in the current revision of patch.
Signed-off-by: Tatsuyuki Ishi <ishitatsuyuki(a)gmail.com>
--
v7: ntdll: Use log-linear bucketing for free lists.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2622
Based on !2524.
This adds the remaining stubs needed for Crazy Machines 3 to work and decode preview images correctly in online mode.
--
v4: msvcr110: Implement _Context::_IsSynchronouslyBlocked.
msvcr110: Add _Context::_IsSynchronouslyBlocked stub.
msvcr110: Add _Cancellation_beacon::_Cancellation_beacon_dtor stub.
msvcr110: Add _Cancellation_beacon::_Cancellation_beacon_ctor stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1979
Based on !2524.
This adds the remaining stubs needed for Crazy Machines 3 to work and decode preview images correctly in online mode.
--
v3: msvcr110: Implement _Context::_IsSynchronouslyBlocked.
msvcr110: Add _Context::_IsSynchronouslyBlocked stub.
msvcr110: Add _Cancellation_beacon::_Cancellation_beacon_dtor stub.
msvcr110: Add _Cancellation_beacon::_Cancellation_beacon_ctor stub.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1979
* Fix InternetGetConnectedStateEx() parameter checking.
* InternetGetConnectedStateExA() must always null-terminate the state string.
* Dump the state string if it is not as expected.
* Remove a couple of redundant InternetGetConnectedStateEx*() tests.
* Avoid an unnecessary lstrlenW() call in internet.c.
--
v2: wininet/tests: Fix InternetGetConnectedStateEx() parameter checking.
wininet: InternetGetConnectedStateExA() must always null-terminate the state string.
wininet/tests: Dump the state string if it is not as expected.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2634
Fixes bug [53826](https://bugs.winehq.org/show_bug.cgi?id=53826).
--
v24: ntdll: Set xattr in NtCreateFile if inferred and requested attributes don't match.
ntdll: Only infer hidden attribute from file name if xattr is not present.
ntdll: Handle hidden file names inside get_file_info instead of after it.
ntdll/tests: Add test for file attributes of files with names beginning with a dot.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1148
On Wed Apr 5 15:02:41 2023 +0000, Alexandre Julliard wrote:
> This doesn't make sense, it's using the wrong slashes and shouldn't be
> necessary in the first place.
Yup, this isn't necessary anymore and I forgot or accidentally dropped the change of the backslashes to forward slashes. The latest version of this MR now contains just a straightforward conversion of that function from working with nt paths to working with unix paths. The reason this conversion is necessary at all is because I'm moving the calls to this function to the `get_file_info` function, so that more places in the code use the correct file attributes (everything that uses `get_file_info` now automatically returns attributes of hidden files correctly), and so that the extended attribute can take precedence over the file name.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1148#note_29732