History log of /reactos/ntoskrnl/cc/pin.c (Results 1 – 25 of 66)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 69bf1405 24-Nov-2024 Thamatip Chitpong <thamatip.chitpong@reactos.org>

[NTOS:MM][NTOS:CC] Rewrite some cache memory management functions (#7510)

Use section object pointer with byte offset instead of using base address. This simplifies the Mm functions themselves and a

[NTOS:MM][NTOS:CC] Rewrite some cache memory management functions (#7510)

Use section object pointer with byte offset instead of using base address. This simplifies the Mm functions themselves and also the code in Cc that calls them.
Also add minor fixes for MmFlushSegment and MmPurgeSegment.

show more ...


Revision tags: 0.4.16-dev, 0.4.15
# cb74d9e2 27-Dec-2022 Timo Kreuzer <timo.kreuzer@reactos.org>

[NTOS/CC] Fix broken usage of _SEH2_FINALLY

Finally handlers are - unlike except blocks - not part of the function they are in, but separate functions, which are called during unwind. PSEH implement

[NTOS/CC] Fix broken usage of _SEH2_FINALLY

Finally handlers are - unlike except blocks - not part of the function they are in, but separate functions, which are called during unwind. PSEH implements them on GCC using nested functions. While "return" from a finally handler is allowed with native SEH, it's handled by the compiler through an extra unwinding operation using _local_unwind, WHICH IS NOT SUPPORTED BY PSEH! With PSEH, returning from a finally handler does not return from the function, instead it will only return from the finally handler and the function will continue below the finally handler as if there was no return at all. To fix this, the return is removed and an additional success check is added.
Also use _SEH_VOLATILE to make sure the variable assignment is not optimized away by the compiler and add zero out the result parameters on error.

show more ...


Revision tags: 0.4.14-release
# ca744679 09-Feb-2021 Timo Kreuzer <timo.kreuzer@reactos.org>

[NTOS:CC] Raise status, when CcMapData fails (#3348)

Also add a check in fastfat, that asserts, when CcMapData returns FALSE.


# 2ba19260 29-Jan-2021 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS:MM][NTOS:CC] Performance improvement again

Read files by 64kb chunks instead of page-sized chunks.


# 7fbf90d6 28-Jan-2021 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS:CC] Fix a bug


# 5949d509 05-Jan-2021 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS:CC][NTOS:MM] Try respecting ValidDataLength


# 9b6240ee 05-Jan-2021 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS:CC] Get rid of ROS_VACB:Valid


# 02167f2f 30-Dec-2020 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS:CC] Properly return the public BCBs


# 57ee31ee 29-Dec-2020 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS:CC] Perform sanity checks before doing anything else


# 358d06c4 29-Dec-2020 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS:CC] Always honor WriteThrough parameter in CcUnpinRepinnedBcb


# 6d97d8d2 18-Dec-2020 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS:CC] Fix some tests, complain where the current implementation won't let us do the right thing


# c74cbf0c 02-Dec-2020 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOS/CC] Be more precise when notifying Mm about dirty pages


# d8cdb89f 06-Nov-2020 Jérôme Gardou <jerome.gardou@reactos.org>

[NTOSKRNL] Overhaul Cc and Mm relationship

Previously, when creating a file section, Mm requested Cc to cache the file, then Cc would request pages from Mm, then Mm would request them back to serve

[NTOSKRNL] Overhaul Cc and Mm relationship

Previously, when creating a file section, Mm requested Cc to cache the file, then Cc would request pages from Mm, then Mm would request them back to serve its file-mapping role
Now, Mm does it all by itself. If file cahcing is requested by the FS driver, then Cc creates a file mapping and uses that to serve its purpose.

This is a rewrite of Cc

show more ...


Revision tags: 0.4.15-dev, 0.4.14-RC, 0.4.13-release, 0.4.14-dev, 0.4.13-RC, 0.4.12-release
# bd759473 18-Apr-2019 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Drop the no longer needed Dirty field

CORE-15954


# 8b6696fc 17-Apr-2019 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Don't mark VACB dirty on unpin

This could happen if BCB was marked dirty previously.
Marking VACB dirty on unpin could lead to a double write of
the VACB, even if clean.
Indeed, now that

[NTOSKRNL] Don't mark VACB dirty on unpin

This could happen if BCB was marked dirty previously.
Marking VACB dirty on unpin could lead to a double write of
the VACB, even if clean.
Indeed, now that setting BCB dirty leads to marking VACB
dirty, the VACB can be flushed in between by the lazy-writer.
The BCB state is not reset on VACB flush, contrary to the VACB state.
Thus, on unpin even if the VACB was already flushed, we were
setting back the dirty state, leading the VACB to be flushed again.

This could bring a small performance downgrade. Though it remains
limited since this is mostly used for FS metadata.
Possibly it could lead to metadata corruption, but this is likely
less possible.

CORE-15954

show more ...


Revision tags: 0.4.12-RC, 0.4.13-dev, 0.4.11-release, 0.4.11-RC, 0.4.12-dev, 0.4.10-release
# cf7969fb 28-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Fix refcounting for BCBs

Now, we make sure that we update ref count and BCB list membership
with the BCB lock held, in a row.
This will avoid race conditions where the BCB was removed fro

[NTOSKRNL] Fix refcounting for BCBs

Now, we make sure that we update ref count and BCB list membership
with the BCB lock held, in a row.
This will avoid race conditions where the BCB was removed from the
list, then referenced again, leading to inconsistencies in memory
and crashes later on.
This could notably be triggered while building ReactOS on ReactOS
(one would call this a regression).

CORE-15235

show more ...


# 18f39227 27-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Call internal helper to get VACB on mapping
We already properly round our offset


# f3b9beeb 23-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Translate pinning flags to mapping flags when first mapping a file


# 3d13a464 13-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Add the CcPinMappedDataCount counter


# 1afcbbd1 13-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Rewrite the way we create BCB for pinning

We won't reuse a BCB created for mapping, we will now have
our own dedicated BCB.
This allows having a bit more cleaner implementation of CcPinMa

[NTOSKRNL] Rewrite the way we create BCB for pinning

We won't reuse a BCB created for mapping, we will now have
our own dedicated BCB.
This allows having a bit more cleaner implementation of CcPinMappedData()

show more ...


# 1acb5a9f 12-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Don't keep the spin lock hold too long when we lost the BCB race

This will avoid a deadlock on unpin.


# cf8ba3bd 11-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Rewrite BCB handling to be more robust

We now handle race conditions when creating BCB to avoid
having duplicated BCB per shared maps.
Also, we already specify whether the memory will be

[NTOSKRNL] Rewrite BCB handling to be more robust

We now handle race conditions when creating BCB to avoid
having duplicated BCB per shared maps.
Also, we already specify whether the memory will be pinned
when creating the BCB, to avoid potential duplications or
BCB misuse.

show more ...


# bd39459f 05-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] Implement support for PIN_IF_BCB flag


# 7fd2751c 05-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] When pinning data, try to find an already pinned BCB

If found, attempt to lock it and return it.

This fixes a lot of CcPinRead tests (and seems to speed up a bit ReactOS)


# 9fc75c11 05-Oct-2018 Pierre Schweitzer <pierre@reactos.org>

[NTOSKRNL] When mapping data, try to find if there's already a BCB

If so, return such BCB instead of creating a new one. This will
allow (at some point) to be more consistent in case of concurrent
m

[NTOSKRNL] When mapping data, try to find if there's already a BCB

If so, return such BCB instead of creating a new one. This will
allow (at some point) to be more consistent in case of concurrent
mapping.

This fixes a few CcMapData tests.

show more ...


123