- ### bash build timings with new caching patch
- real 2m42.33s
- user 3m16.34s
- sys 4m23.85s
- + echo 0
- 0
- + echo '#Done.'
- #Done.
- + return 0
- real 10m25.388s
- user 4m22.396s
- sys 7m25.641s
- ### bash build timings without caching patch
- real 2m31.25s
- user 2m50.71s
- sys 4m08.78s
- + echo 0
- 0
- + echo '#Done.'
- #Done.
- + return 0
- real 10m41.054s
- user 4m21.194s
- sys 7m24.585s
- diff --git a/daemon/delegation.c b/daemon/delegation.c
- index 352a4f7..0da6600 100644
- --- a/daemon/delegation.c
- +++ b/daemon/delegation.c
- @@ -68,6 +68,12 @@ static int delegation_create(
- state->ref_count = 1;
- *deleg_out = state;
- out:
- +
- + if (status == NO_ERROR) {
- + DPRINTF(0,
- + ("delegation_create(file->path->path='%s',delegation->type=%d)\n",
- + file->path->path, (int)delegation->type));
- + }
- return status;
- }
- diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
- index a5b5284..f7a710d 100644
- --- a/sys/nfs41sys_openclose.c
- +++ b/sys/nfs41sys_openclose.c
- @@ -950,12 +950,20 @@ retry_on_link:
- if (Fcb->OpenCount > 0 && (isDataAccess(params->DesiredAccess) ||
- nfs41_fcb->changeattr != entry->ChangeTime) &&
- !nfs41_fcb->StandardInfo.Directory) {
- - ULONG flag = DISABLE_CACHING;
- #ifdef DEBUG_OPEN
- DbgP("nfs41_Create: reopening (changed) file '%wZ'\n",
- SrvOpen->pAlreadyPrefixedName);
- #endif
- +#if 1
- +
- +// (void)RxFlushFcbInSystemCache((PFCB)Fcb, TRUE);
- + RxAcquirePagingIoResource(RxContext, (PFCB)Fcb);
- + RxReleasePagingIoResource(RxContext, (PFCB)Fcb);
- +
- +#else
- + ULONG flag = DISABLE_CACHING;
- RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
- +#endif
- }
- if (!nfs41_fcb->StandardInfo.Directory &&
- @@ -1037,6 +1045,23 @@ retry_on_link:
- }
- }
- +#if 1
- + if ((SrvOpen->DesiredAccess & (FILE_WRITE_DATA | FILE_APPEND_DATA)) &&
- + !pVNetRootContext->write_thru &&
- + !pVNetRootContext->nocache &&
- + !nfs41_fobx->write_thru && !nfs41_fobx->nocache &&
- + !(SrvOpen->BufferingFlags &
- + (FCB_STATE_WRITEBUFFERING_ENABLED |
- + FCB_STATE_WRITECACHING_ENABLED))) {
- + enable_caching(SrvOpen, nfs41_fobx, nfs41_fcb->changeattr,
- + pVNetRootContext->session);
- + }
- + else {
- + ULONG flag = DISABLE_CACHING;
- + RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
- + }
- +#endif
- +
- if ((params->CreateOptions & FILE_DELETE_ON_CLOSE) &&
- !pVNetRootContext->read_only)
- nfs41_fcb->StandardInfo.DeletePending = TRUE;
- diff --git a/sys/nfs41sys_readwrite.c b/sys/nfs41sys_readwrite.c
- index cc718df..c60219a 100644
- --- a/sys/nfs41sys_readwrite.c
- +++ b/sys/nfs41sys_readwrite.c
- @@ -238,7 +238,9 @@ NTSTATUS nfs41_Read(
- NFS41GetVNetRootExtension(SrvOpen->pVNetRoot);
- __notnull PNFS41_NETROOT_EXTENSION pNetRootContext =
- NFS41GetNetRootExtension(SrvOpen->pVNetRoot->pNetRoot);
- +#if 0
- __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(RxContext->pFcb);
- +#endif
- __notnull PNFS41_FOBX nfs41_fobx = NFS41GetFobxExtension(RxContext->pFobx);
- DWORD io_delay;
- #ifdef ENABLE_TIMINGS
- @@ -294,6 +296,7 @@ NTSTATUS nfs41_Read(
- status = RxContext->CurrentIrp->IoStatus.Status = STATUS_SUCCESS;
- RxContext->IoStatusBlock.Information = entry->buf_len;
- +#if 0
- if ((!BooleanFlagOn(LowIoContext->ParamsFor.ReadWrite.Flags,
- LOWIO_READWRITEFLAG_PAGING_IO) &&
- (SrvOpen->DesiredAccess & FILE_READ_DATA) &&
- @@ -304,6 +307,7 @@ NTSTATUS nfs41_Read(
- enable_caching(SrvOpen, nfs41_fobx, nfs41_fcb->changeattr,
- pVNetRootContext->session);
- }
- +#endif
- } else {
- status = map_readwrite_errors(entry->status);
- RxContext->CurrentIrp->IoStatus.Status = status;
- @@ -421,6 +425,7 @@ NTSTATUS nfs41_Write(
- RxContext->IoStatusBlock.Information = entry->buf_len;
- nfs41_fcb->changeattr = entry->ChangeTime;
- +#if 0
- //re-enable write buffering
- if (!BooleanFlagOn(LowIoContext->ParamsFor.ReadWrite.Flags,
- LOWIO_READWRITEFLAG_PAGING_IO) &&
- @@ -433,7 +438,9 @@ NTSTATUS nfs41_Write(
- FCB_STATE_WRITECACHING_ENABLED))) {
- enable_caching(SrvOpen, nfs41_fobx, nfs41_fcb->changeattr,
- pVNetRootContext->session);
- - } else if (!nfs41_fobx->deleg_type)
- + } else
- +#endif
- + if (!nfs41_fobx->deleg_type)
- nfs41_update_fcb_list(RxContext->pFcb, entry->ChangeTime);
- } else {
bash build timings with new caching patch
Posted by Anonymous on Sat 31st May 2025 15:03
raw | new post
Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.