)]}'
{
  "commit": "e386dfc56f837da66d00a078e5314bc8382fab83",
  "tree": "108d8eff7a9260944f2722a3d6cfa6d4171f8b32",
  "parents": [
    "2585cf9dfaaddf00b069673f27bb3f8530e2039c"
  ],
  "author": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Dec 10 14:00:15 2021 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon Dec 13 10:55:30 2021 -0800"
  },
  "message": "fget: clarify and improve __fget_files() implementation\n\nCommit 054aa8d439b9 (\"fget: check that the fd still exists after getting\na ref to it\") fixed a race with getting a reference to a file just as it\nwas being closed.  It was a fairly minimal patch, and I didn\u0027t think\nre-checking the file pointer lookup would be a measurable overhead,\nsince it was all right there and cached.\n\nBut I was wrong, as pointed out by the kernel test robot.\n\nThe \u0027poll2\u0027 case of the will-it-scale.per_thread_ops benchmark regressed\nquite noticeably.  Admittedly it seems to be a very artificial test:\ndoing \"poll()\" system calls on regular files in a very tight loop in\nmultiple threads.\n\nThat means that basically all the time is spent just looking up file\ndescriptors without ever doing anything useful with them (not that doing\n\u0027poll()\u0027 on a regular file is useful to begin with).  And as a result it\nshows the extra \"re-check fd\" cost as a sore thumb.\n\nHappily, the regression is fixable by just writing the code to loook up\nthe fd to be better and clearer.  There\u0027s still a cost to verify the\nfile pointer, but now it\u0027s basically in the noise even for that\nbenchmark that does nothing else - and the code is more understandable\nand has better comments too.\n\n[ Side note: this patch is also a classic case of one that looks very\n  messy with the default greedy Myers diff - it\u0027s much more legible with\n  either the patience of histogram diff algorithm ]\n\nLink: https://lore.kernel.org/lkml/20211210053743.GA36420@xsang-OptiPlex-9020/\nLink: https://lore.kernel.org/lkml/20211213083154.GA20853@linux.intel.com/\nReported-by: kernel test robot \u003coliver.sang@intel.com\u003e\nTested-by: Carel Si \u003cbeibei.si@intel.com\u003e\nCc: Jann Horn \u003cjannh@google.com\u003e\nCc: Miklos Szeredi \u003cmszeredi@redhat.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ad4a8bf3cf109fd984449eedef5de6bf9fa342e8",
      "old_mode": 33188,
      "old_path": "fs/file.c",
      "new_id": "97d212a9b814454b83091e9a1dc40b76fe908b38",
      "new_mode": 33188,
      "new_path": "fs/file.c"
    }
  ]
}
