Skip to content
Snippets Groups Projects
  1. Jan 12, 2024
    • lizhigang's avatar
      Add slice copy support for socket file type. · 744796fb
      lizhigang authored
      
      Splice can be used to speed up file copy operations
      by avoiding moving any memory between kernel/user space.
      But splice copy can not support from socket file to
      regular/socket file directly. So use pipe file as proxy,
      socket/regular --> pipe --> socket/regular. Even it needs
      2 times splice syscall, it is still much faster
      than user space copy.
      
      Please refer to the comparison data below for the time
      consumption of executing FileUtils.copy in
      FileUtilsTest:testCopy_SocketToFile_FileToSocket
      
      file-->socket(unit ms):
      32KB: user_cp:0.604, splice_cp:0.113, reduce 80%
      32MB: user_cp:236, splice_cp:68, reduce 71%
      
      socket-->file(unit ms):
      32KB: user_cp:0.611, splice_cp:0.240, reduce 61%
      32MB: user_cp:284, splice_cp:88, reduce 69%
      
      The network environment for this test is localhost,
      and the data in real scenarios depends more
      on the actual network environment.
      
      Test: atest FrameworksCoreTests:android.os.FileUtilsTest
      
      Change-Id: I0636647934a889ce95bdf4df0db428cb370148fd
      Signed-off-by: default avatarlizhigang <lizhigang.1220@bytedance.com>
      744796fb
  2. Jan 08, 2024
  3. Jan 06, 2024
    • Treehugger Robot's avatar
    • Yifan Hong's avatar
      recovery: Delete internal verifyPackageCompatibility. · 16da32b0
      Yifan Hong authored
      Non-A/B has been deprecated for long. During non-A/B updates,
      compatibility.zip is checked with VintfObject.verify(), which
      is another deprecated function that always returns compatible
      if a list of package VINTF XMLs are supplied. (see below.) Hence, the private
      RecoverySystem.verifyPackageCompatibility was just useless code
      that unconditionally returns true except for invalid ZIP file.
      Remove it. Replace the public RecoverySystem.verifyPackageCompatibility
      and make it return true unconditonally.
      
      VintfObject.verify() with OTA XMLs are deprecated per
      http://b/139300422 [VINTF] Delete OTA vintf checking code
      in http://r.android.com/1194233 ("Delete VINTF compatibility checks
      during OTA."), in 2019. We had decided that compatibility checks
      during OTA should be removed, and moved to OTA generation time instead.
      Using an old libvintf on the device to check against new libvintf
      metadata required forward compatibility of libvintf, which cannot be
      achieved. Instead, the device should verify the signature of the OTA to
      verify its source.
      
      Test: TH
      Bug: 270169217
      Bug: 139300422
      Change-Id: I775d29e4cd1d165233e07cfb820d1fe343fa4757
      16da32b0
  4. Jan 05, 2024
  5. Jan 04, 2024
  6. Jan 03, 2024
  7. Jan 02, 2024
Loading