)]}'
{
  "commit": "529bf6be5c04f2e869d07bfdb122e9fd98ade714",
  "tree": "38514bb3941c4ac2a79266e4483663b79efa2f22",
  "parents": [
    "21a1ea9eb40411d4ee29448c53b9e4c0654d6ceb"
  ],
  "author": {
    "name": "Dipankar Sarma",
    "email": "dipankar@in.ibm.com",
    "time": "Tue Mar 07 21:55:35 2006 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@g5.osdl.org",
    "time": "Wed Mar 08 14:14:01 2006 -0800"
  },
  "message": "[PATCH] fix file counting\n\nI have benchmarked this on an x86_64 NUMA system and see no significant\nperformance difference on kernbench.  Tested on both x86_64 and powerpc.\n\nThe way we do file struct accounting is not very suitable for batched\nfreeing.  For scalability reasons, file accounting was\nconstructor/destructor based.  This meant that nr_files was decremented\nonly when the object was removed from the slab cache.  This is susceptible\nto slab fragmentation.  With RCU based file structure, consequent batched\nfreeing and a test program like Serge\u0027s, we just speed this up and end up\nwith a very fragmented slab -\n\nllm22:~ # cat /proc/sys/fs/file-nr\n587730  0       758844\n\nAt the same time, I see only a 2000+ objects in filp cache.  The following\npatch I fixes this problem.\n\nThis patch changes the file counting by removing the filp_count_lock.\nInstead we use a separate percpu counter, nr_files, for now and all\naccesses to it are through get_nr_files() api.  In the sysctl handler for\nnr_files, we populate files_stat.nr_files before returning to user.\n\nCounting files as an when they are created and destroyed (as opposed to\ninside slab) allows us to correctly count open files with RCU.\n\nSigned-off-by: Dipankar Sarma \u003cdipankar@in.ibm.com\u003e\nCc: \"Paul E. McKenney\" \u003cpaulmck@us.ibm.com\u003e\nCc: \"David S. Miller\" \u003cdavem@davemloft.net\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "a173bba326666e322ca92813c1667671f783f65e",
      "old_mode": 33188,
      "old_path": "fs/dcache.c",
      "new_id": "11dc83092d4aa48c78650f6dee4b48b834d25d7e",
      "new_mode": 33188,
      "new_path": "fs/dcache.c"
    },
    {
      "type": "modify",
      "old_id": "768b581675433ed0e02eb0a9bcf35288de7adca5",
      "old_mode": 33188,
      "old_path": "fs/file_table.c",
      "new_id": "44fabeaa9415b315155b7bf92497491a8ef1bb08",
      "new_mode": 33188,
      "new_path": "fs/file_table.c"
    },
    {
      "type": "modify",
      "old_id": "418b6101b59a02d8b9efb7501e3de51808a59f95",
      "old_mode": 33188,
      "old_path": "include/linux/file.h",
      "new_id": "9901b850f2e466158556711303829d6d114686ce",
      "new_mode": 33188,
      "new_path": "include/linux/file.h"
    },
    {
      "type": "modify",
      "old_id": "0cc34b1c42c9aa42b69365263d065578fc5282da",
      "old_mode": 33188,
      "old_path": "include/linux/fs.h",
      "new_id": "51c0c93bdf9396278e8e7b3a2015686c6a7c1031",
      "new_mode": 33188,
      "new_path": "include/linux/fs.h"
    },
    {
      "type": "modify",
      "old_id": "de2d9109194ef75a6bb5257bf06de852c98f9366",
      "old_mode": 33188,
      "old_path": "kernel/sysctl.c",
      "new_id": "32b48e8ee36e8aaa6334a3979317eaf2b8848725",
      "new_mode": 33188,
      "new_path": "kernel/sysctl.c"
    },
    {
      "type": "modify",
      "old_id": "1b5989b1b6700cd8d5edf0926782939733e5c329",
      "old_mode": 33188,
      "old_path": "net/unix/af_unix.c",
      "new_id": "c323cc6a28b0e3f6042058879ead5dd9d5d36aaa",
      "new_mode": 33188,
      "new_path": "net/unix/af_unix.c"
    }
  ]
}
