)]}'
{
  "commit": "bf368e4e70cd4e0f880923c44e95a4273d725ab4",
  "tree": "43c8cd772aa17ca1dd852682ca489ccc7ab3fcd6",
  "parents": [
    "37b607c5ac3b7c92a6a3624bb29f1cdcdcf7044a"
  ],
  "author": {
    "name": "Eric Dumazet",
    "email": "dada1@cosmosbay.com",
    "time": "Tue Apr 28 02:24:21 2009 -0700"
  },
  "committer": {
    "name": "David S. Miller",
    "email": "davem@davemloft.net",
    "time": "Tue Apr 28 02:24:21 2009 -0700"
  },
  "message": "net: Avoid extra wakeups of threads blocked in wait_for_packet()\n\nIn 2.6.25 we added UDP mem accounting.\n\nThis unfortunatly added a penalty when a frame is transmitted, since\nwe have at TX completion time to call sock_wfree() to perform necessary\nmemory accounting. This calls sock_def_write_space() and utimately\nscheduler if any thread is waiting on the socket.\nThread(s) waiting for an incoming frame was scheduled, then had to sleep\nagain as event was meaningless.\n\n(All threads waiting on a socket are using same sk_sleep anchor)\n\nThis adds lot of extra wakeups and increases latencies, as noted\nby Christoph Lameter, and slows down softirq handler.\n\nReference : http://marc.info/?l\u003dlinux-netdev\u0026m\u003d124060437012283\u0026w\u003d2 \n\nFortunatly, Davide Libenzi recently added concept of keyed wakeups\ninto kernel, and particularly for sockets (see commit\n37e5540b3c9d838eb20f2ca8ea2eb8072271e403 \nepoll keyed wakeups: make sockets use keyed wakeups)\n\nDavide goal was to optimize epoll, but this new wakeup infrastructure\ncan help non epoll users as well, if they care to setup an appropriate\nhandler.\n\nThis patch introduces new DEFINE_WAIT_FUNC() helper and uses it\nin wait_for_packet(), so that only relevant event can wakeup a thread\nblocked in this function.\n\nTrace of function calls from bnx2 TX completion bnx2_poll_work() is :\n__kfree_skb()\n skb_release_head_state()\n  sock_wfree()\n   sock_def_write_space()\n    __wake_up_sync_key()\n     __wake_up_common()\n      receiver_wake_function() : Stops here since thread is waiting for an INPUT\n\n\nReported-by: Christoph Lameter \u003ccl@linux.com\u003e\nSigned-off-by: Eric Dumazet \u003cdada1@cosmosbay.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "5d631c17eaee339f4cbcc826622887278a24546f",
      "old_mode": 33188,
      "old_path": "include/linux/wait.h",
      "new_id": "bc024632f365915f99894f5d799938f5e4e69b45",
      "new_mode": 33188,
      "new_path": "include/linux/wait.h"
    },
    {
      "type": "modify",
      "old_id": "d0de644b378d5a71e161a905c85d847622df49d2",
      "old_mode": 33188,
      "old_path": "net/core/datagram.c",
      "new_id": "b01a76abe1d2f99dc577064037e4b4a1cb9ecd82",
      "new_mode": 33188,
      "new_path": "net/core/datagram.c"
    }
  ]
}
