pastebin - collaborative debugging tool
nrubsig.kpaste.net RSS


bash build timings with new caching patch
Posted by Anonymous on Sat 31st May 2025 15:03
raw | new post

  1. ### bash build timings with new caching patch
  2. real    2m42.33s
  3. user    3m16.34s
  4. sys     4m23.85s
  5. + echo 0
  6. 0
  7. + echo '#Done.'
  8. #Done.
  9. + return 0
  10.  
  11. real    10m25.388s
  12. user    4m22.396s
  13. sys     7m25.641s
  14.  
  15. ### bash build timings without caching patch
  16. real    2m31.25s
  17. user    2m50.71s
  18. sys     4m08.78s
  19. + echo 0
  20. 0
  21. + echo '#Done.'
  22. #Done.
  23. + return 0
  24.  
  25. real    10m41.054s
  26. user    4m21.194s
  27. sys     7m24.585s
  28.  
  29. diff --git a/daemon/delegation.c b/daemon/delegation.c
  30. index 352a4f7..0da6600 100644
  31. --- a/daemon/delegation.c
  32. +++ b/daemon/delegation.c
  33. @@ -68,6 +68,12 @@ static int delegation_create(
  34.      state->ref_count = 1;
  35.      *deleg_out = state;
  36.  out:
  37. +
  38. +    if (status == NO_ERROR) {
  39. +        DPRINTF(0,
  40. +            ("delegation_create(file->path->path='%s',delegation->type=%d)\n",
  41. +            file->path->path, (int)delegation->type));
  42. +    }
  43.      return status;
  44.  }
  45.  
  46. diff --git a/sys/nfs41sys_openclose.c b/sys/nfs41sys_openclose.c
  47. index a5b5284..f7a710d 100644
  48. --- a/sys/nfs41sys_openclose.c
  49. +++ b/sys/nfs41sys_openclose.c
  50. @@ -950,12 +950,20 @@ retry_on_link:
  51.      if (Fcb->OpenCount > 0 && (isDataAccess(params->DesiredAccess) ||
  52.              nfs41_fcb->changeattr != entry->ChangeTime) &&
  53.                  !nfs41_fcb->StandardInfo.Directory) {
  54. -        ULONG flag = DISABLE_CACHING;
  55.  #ifdef DEBUG_OPEN
  56.          DbgP("nfs41_Create: reopening (changed) file '%wZ'\n",
  57.              SrvOpen->pAlreadyPrefixedName);
  58.  #endif
  59. +#if 1
  60. +
  61. +//        (void)RxFlushFcbInSystemCache((PFCB)Fcb, TRUE);
  62. +            RxAcquirePagingIoResource(RxContext, (PFCB)Fcb);
  63. +            RxReleasePagingIoResource(RxContext, (PFCB)Fcb);
  64. +
  65. +#else
  66. +        ULONG flag = DISABLE_CACHING;
  67.          RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
  68. +#endif
  69.      }
  70.  
  71.      if (!nfs41_fcb->StandardInfo.Directory &&
  72. @@ -1037,6 +1045,23 @@ retry_on_link:
  73.          }
  74.      }
  75.  
  76. +#if 1
  77. +    if ((SrvOpen->DesiredAccess & (FILE_WRITE_DATA | FILE_APPEND_DATA)) &&
  78. +        !pVNetRootContext->write_thru &&
  79. +        !pVNetRootContext->nocache &&
  80. +        !nfs41_fobx->write_thru && !nfs41_fobx->nocache &&
  81. +        !(SrvOpen->BufferingFlags &
  82. +            (FCB_STATE_WRITEBUFFERING_ENABLED |
  83. +            FCB_STATE_WRITECACHING_ENABLED))) {
  84. +        enable_caching(SrvOpen, nfs41_fobx, nfs41_fcb->changeattr,
  85. +            pVNetRootContext->session);
  86. +    }
  87. +    else {
  88. +        ULONG flag = DISABLE_CACHING;
  89. +        RxChangeBufferingState((PSRV_OPEN)SrvOpen, ULongToPtr(flag), 1);
  90. +    }
  91. +#endif
  92. +
  93.      if ((params->CreateOptions & FILE_DELETE_ON_CLOSE) &&
  94.              !pVNetRootContext->read_only)
  95.          nfs41_fcb->StandardInfo.DeletePending = TRUE;
  96. diff --git a/sys/nfs41sys_readwrite.c b/sys/nfs41sys_readwrite.c
  97. index cc718df..c60219a 100644
  98. --- a/sys/nfs41sys_readwrite.c
  99. +++ b/sys/nfs41sys_readwrite.c
  100. @@ -238,7 +238,9 @@ NTSTATUS nfs41_Read(
  101.          NFS41GetVNetRootExtension(SrvOpen->pVNetRoot);
  102.      __notnull PNFS41_NETROOT_EXTENSION pNetRootContext =
  103.          NFS41GetNetRootExtension(SrvOpen->pVNetRoot->pNetRoot);
  104. +#if 0
  105.      __notnull PNFS41_FCB nfs41_fcb = NFS41GetFcbExtension(RxContext->pFcb);
  106. +#endif
  107.      __notnull PNFS41_FOBX nfs41_fobx = NFS41GetFobxExtension(RxContext->pFobx);
  108.      DWORD io_delay;
  109.  #ifdef ENABLE_TIMINGS
  110. @@ -294,6 +296,7 @@ NTSTATUS nfs41_Read(
  111.          status = RxContext->CurrentIrp->IoStatus.Status = STATUS_SUCCESS;
  112.          RxContext->IoStatusBlock.Information = entry->buf_len;
  113.  
  114. +#if 0
  115.          if ((!BooleanFlagOn(LowIoContext->ParamsFor.ReadWrite.Flags,
  116.                  LOWIO_READWRITEFLAG_PAGING_IO) &&
  117.                  (SrvOpen->DesiredAccess & FILE_READ_DATA) &&
  118. @@ -304,6 +307,7 @@ NTSTATUS nfs41_Read(
  119.              enable_caching(SrvOpen, nfs41_fobx, nfs41_fcb->changeattr,
  120.                  pVNetRootContext->session);
  121.          }
  122. +#endif
  123.      } else {
  124.          status = map_readwrite_errors(entry->status);
  125.          RxContext->CurrentIrp->IoStatus.Status = status;
  126. @@ -421,6 +425,7 @@ NTSTATUS nfs41_Write(
  127.          RxContext->IoStatusBlock.Information = entry->buf_len;
  128.          nfs41_fcb->changeattr = entry->ChangeTime;
  129.  
  130. +#if 0
  131.          //re-enable write buffering
  132.          if (!BooleanFlagOn(LowIoContext->ParamsFor.ReadWrite.Flags,
  133.                  LOWIO_READWRITEFLAG_PAGING_IO) &&
  134. @@ -433,7 +438,9 @@ NTSTATUS nfs41_Write(
  135.                   FCB_STATE_WRITECACHING_ENABLED))) {
  136.              enable_caching(SrvOpen, nfs41_fobx, nfs41_fcb->changeattr,
  137.                  pVNetRootContext->session);
  138. -        } else if (!nfs41_fobx->deleg_type)
  139. +        } else
  140. +#endif
  141. +        if (!nfs41_fobx->deleg_type)
  142.              nfs41_update_fcb_list(RxContext->pFcb, entry->ChangeTime);
  143.  
  144.      } else {

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.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at