)]}'
{
  "log": [
    {
      "commit": "cb289d6244a37cf932c571d6deb0daa8030f931b",
      "tree": "05bea15a25c9d9a4dcc0658a6a8bf845daca535a",
      "parents": [
        "a6085fbaf65ab09bfb5ec8d902d6d21680fe1895"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Wed Jan 13 09:34:36 2010 -0800"
      },
      "committer": {
        "name": "Marcelo Tosatti",
        "email": "mtosatti@redhat.com",
        "time": "Mon Jan 25 12:26:38 2010 -0200"
      },
      "message": "eventfd - allow atomic read and waitqueue remove\n\nKVM needs a wait to atomically remove themselves from the eventfd -\u003epoll()\nwait queue head, in order to handle correctly their IRQfd deassign\noperation.\n\nThis patch introduces such API, plus a way to read an eventfd from its\ncontext.\n\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nSigned-off-by: Avi Kivity \u003cavi@redhat.com\u003e\n"
    },
    {
      "commit": "562787a5c32ccdf182de27793a83a9f2ee86cd77",
      "tree": "3308afd59d3b7449afa3d6a6cd624d06ce035e88",
      "parents": [
        "515350b6fd041396f425180589e08812dd13615f"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Tue Sep 22 16:43:57 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Sep 23 07:39:29 2009 -0700"
      },
      "message": "anonfd: split interface into file creation and install\n\nSplit the anonfd interface into a bare file pointer creation one, and a\nfile pointer creation plus install one.\n\nThere are cases, like the usage of eventfds inside other kernel\ninterfaces, where the file pointer created by anonfd needs to be used\ninside the initialization of other structures.\n\nAs it is right now, as soon as anon_inode_getfd() returns, the kenrle can\nrace with userspace closing the newly installed file descriptor.\n\nThis patch, while keeping the old anon_inode_getfd(), introduces a new\nanon_inode_getfile() (whose services are reused in anon_inode_getfd())\nthat allows to split the file creation phase and the fd install one.\n\nOnce all the kernel structures are initialized, the code can call the\nproper fd_install().\n\nGregory manifested the need for something like this inside KVM.\n\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Alexander Viro \u003cviro@zeniv.linux.org.uk\u003e\nCc: James Morris \u003cjmorris@namei.org\u003e\nCc: Peter Zijlstra \u003ca.p.zijlstra@chello.nl\u003e\nCc: Gregory Haskins \u003cghaskins@novell.com\u003e\nAcked-by: Serge Hallyn \u003cserue@us.ibm.com\u003e\nAcked-by: Roland Dreier \u003crolandd@cisco.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "133890103b9de08904f909995973e4b5c08a780e",
      "tree": "0cda85a58dafafa0a197cf1a789124203f1e7a88",
      "parents": [
        "f7c2df9b55212d5ec94169a4de11e44c683e0af4"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Tue Jun 30 11:41:11 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Tue Jun 30 18:55:58 2009 -0700"
      },
      "message": "eventfd: revised interface and cleanups\n\nChange the eventfd interface to de-couple the eventfd memory context, from\nthe file pointer instance.\n\nWithout such change, there is no clean way to racely free handle the\nPOLLHUP event sent when the last instance of the file* goes away.  Also,\nnow the internal eventfd APIs are using the eventfd context instead of the\nfile*.\n\nThis patch is required by KVM\u0027s IRQfd code, which is still under\ndevelopment.\n\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Gregory Haskins \u003cghaskins@novell.com\u003e\nCc: Rusty Russell \u003crusty@rustcorp.com.au\u003e\nCc: Benjamin LaHaise \u003cbcrl@kvack.org\u003e\nCc: Avi Kivity \u003cavi@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "bcd0b235bf3808dec5115c381cd55568f63b85f0",
      "tree": "d73c4aa83dcd5321d2c48e070020576098b9705e",
      "parents": [
        "4f0989dbfa8d18dd17c32120aac1eb3e906a62a2"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Tue Mar 31 15:24:18 2009 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 01 08:59:20 2009 -0700"
      },
      "message": "eventfd: improve support for semaphore-like behavior\n\nPeople started using eventfd in a semaphore-like way where before they\nwere using pipes.\n\nThat is, counter-based resource access.  Where a \"wait()\" returns\nimmediately by decrementing the counter by one, if counter is greater than\nzero.  Otherwise will wait.  And where a \"post(count)\" will add count to\nthe counter releasing the appropriate amount of waiters.  If eventfd the\n\"post\" (write) part is fine, while the \"wait\" (read) does not dequeue 1,\nbut the whole counter value.\n\nThe problem with eventfd is that a read() on the fd returns and wipes the\nwhole counter, making the use of it as semaphore a little bit more\ncumbersome.  You can do a read() followed by a write() of COUNTER-1, but\nIMO it\u0027s pretty easy and cheap to make this work w/out extra steps.  This\npatch introduces a new eventfd flag that tells eventfd to only dequeue 1\nfrom the counter, allowing simple read/write to make it behave like a\nsemaphore.  Simple test here:\n\nhttp://www.xmailserver.org/eventfd-sem.c\n\nTo be back-compatible with earlier kernels, userspace applications should\nprobe for the availability of this feature via\n\n#ifdef EFD_SEMAPHORE\n\tfd \u003d eventfd2 (CNT, EFD_SEMAPHORE);\n\tif (fd \u003d\u003d -1 \u0026\u0026 errno \u003d\u003d EINVAL)\n\t\t\u003cfallback\u003e\n#else\n\t\t\u003cfallback\u003e\n#endif\n\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: \u003clinux-api@vger.kernel.org\u003e\nTested-by: Michael Kerrisk \u003cmtk.manpages@gmail.com\u003e\nCc: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e7d476dfdf0bcfed478a207aecfdc84f81efecaf",
      "tree": "8adc7f4cf562cd0e283d4abdaa0633686a59d8b2",
      "parents": [
        "5fb5e04926a54bc1c22bba7ca166840f4476196f"
      ],
      "author": {
        "name": "Ulrich Drepper",
        "email": "drepper@redhat.com",
        "time": "Wed Jul 23 21:29:38 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 24 10:47:29 2008 -0700"
      },
      "message": "flag parameters: NONBLOCK in eventfd\n\nThis patch adds support for the EFD_NONBLOCK flag to eventfd2.  The\nadditional changes needed are minimal.\n\nThe following test must be adjusted for architectures other than x86 and\nx86-64 and in case the syscall numbers changed.\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n#include \u003cfcntl.h\u003e\n#include \u003cstdio.h\u003e\n#include \u003cunistd.h\u003e\n#include \u003csys/syscall.h\u003e\n\n#ifndef __NR_eventfd2\n# ifdef __x86_64__\n#  define __NR_eventfd2 290\n# elif defined __i386__\n#  define __NR_eventfd2 328\n# else\n#  error \"need __NR_eventfd2\"\n# endif\n#endif\n\n#define EFD_NONBLOCK O_NONBLOCK\n\nint\nmain (void)\n{\n  int fd \u003d syscall (__NR_eventfd2, 1, 0);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"eventfd2(0) failed\");\n      return 1;\n    }\n  int fl \u003d fcntl (fd, F_GETFL);\n  if (fl \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if (fl \u0026 O_NONBLOCK)\n    {\n      puts (\"eventfd2(0) sets non-blocking mode\");\n      return 1;\n    }\n  close (fd);\n\n  fd \u003d syscall (__NR_eventfd2, 1, EFD_NONBLOCK);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"eventfd2(EFD_NONBLOCK) failed\");\n      return 1;\n    }\n  fl \u003d fcntl (fd, F_GETFL);\n  if (fl \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if ((fl \u0026 O_NONBLOCK) \u003d\u003d 0)\n    {\n      puts (\"eventfd2(EFD_NONBLOCK) does not set non-blocking mode\");\n      return 1;\n    }\n  close (fd);\n\n  puts (\"OK\");\n\n  return 0;\n}\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nAcked-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@googlemail.com\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "b087498eb5605673b0f260a7620d91818cd72304",
      "tree": "977d9dbcd326a9582dfc5ad000995d26886c872e",
      "parents": [
        "9deb27baedb79759c3ab9435a7d8b841842d56e9"
      ],
      "author": {
        "name": "Ulrich Drepper",
        "email": "drepper@redhat.com",
        "time": "Wed Jul 23 21:29:25 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Thu Jul 24 10:47:27 2008 -0700"
      },
      "message": "flag parameters: eventfd\n\nThis patch adds the new eventfd2 syscall.  It extends the old eventfd\nsyscall by one parameter which is meant to hold a flag value.  In this\npatch the only flag support is EFD_CLOEXEC which causes the close-on-exec\nflag for the returned file descriptor to be set.\n\nA new name EFD_CLOEXEC is introduced which in this implementation must\nhave the same value as O_CLOEXEC.\n\nThe following test must be adjusted for architectures other than x86 and\nx86-64 and in case the syscall numbers changed.\n\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n#include \u003cfcntl.h\u003e\n#include \u003cstdio.h\u003e\n#include \u003cunistd.h\u003e\n#include \u003csys/syscall.h\u003e\n\n#ifndef __NR_eventfd2\n# ifdef __x86_64__\n#  define __NR_eventfd2 290\n# elif defined __i386__\n#  define __NR_eventfd2 328\n# else\n#  error \"need __NR_eventfd2\"\n# endif\n#endif\n\n#define EFD_CLOEXEC O_CLOEXEC\n\nint\nmain (void)\n{\n  int fd \u003d syscall (__NR_eventfd2, 1, 0);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"eventfd2(0) failed\");\n      return 1;\n    }\n  int coe \u003d fcntl (fd, F_GETFD);\n  if (coe \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if (coe \u0026 FD_CLOEXEC)\n    {\n      puts (\"eventfd2(0) sets close-on-exec flag\");\n      return 1;\n    }\n  close (fd);\n\n  fd \u003d syscall (__NR_eventfd2, 1, EFD_CLOEXEC);\n  if (fd \u003d\u003d -1)\n    {\n      puts (\"eventfd2(EFD_CLOEXEC) failed\");\n      return 1;\n    }\n  coe \u003d fcntl (fd, F_GETFD);\n  if (coe \u003d\u003d -1)\n    {\n      puts (\"fcntl failed\");\n      return 1;\n    }\n  if ((coe \u0026 FD_CLOEXEC) \u003d\u003d 0)\n    {\n      puts (\"eventfd2(EFD_CLOEXEC) does not set close-on-exec flag\");\n      return 1;\n    }\n  close (fd);\n\n  puts (\"OK\");\n\n  return 0;\n}\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n[akpm@linux-foundation.org: add sys_ni stub]\nSigned-off-by: Ulrich Drepper \u003cdrepper@redhat.com\u003e\nAcked-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nCc: Michael Kerrisk \u003cmtk.manpages@googlemail.com\u003e\nCc: \u003clinux-arch@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "735643ee6cc5249bfac07fcad0946a5e7aff4423",
      "tree": "e725df246f4a3cf88b6b42a28d859ab969acf81c",
      "parents": [
        "71cc2c2152170b8166f59abb0604dc62073aeb92"
      ],
      "author": {
        "name": "Robert P. J. Day",
        "email": "rpjday@crashcourse.ca",
        "time": "Wed Apr 30 00:55:12 2008 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@linux-foundation.org",
        "time": "Wed Apr 30 08:29:54 2008 -0700"
      },
      "message": "Remove \"#ifdef __KERNEL__\" checks from unexported headers\n\nRemove the \"#ifdef __KERNEL__\" tests from unexported header files in\nlinux/include whose entire contents are wrapped in that preprocessor\ntest.\n\nSigned-off-by: Robert P. J. Day \u003crpjday@crashcourse.ca\u003e\nCc: David Woodhouse \u003cdwmw2@infradead.org\u003e\nCc: Sam Ravnborg \u003csam@ravnborg.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "d2fd89962cd5de6b1fb9c1c789b56bc16f58f121",
      "tree": "0c07ea2d059d715e6f0d9c8778ea1e1382dfbc95",
      "parents": [
        "c0887eedb4498e20e7895508b7af8e419e397405"
      ],
      "author": {
        "name": "Randy Dunlap",
        "email": "randy.dunlap@oracle.com",
        "time": "Wed Jun 27 14:09:48 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Thu Jun 28 11:34:53 2007 -0700"
      },
      "message": "eventfd: clean compile when CONFIG_EVENTFD\u003dn\n\nFix gcc warning and add parameter checking when CONFIG_EVENTFD\u003dn:\n\nfs/aio.c: In function \u0027aio_complete\u0027:\nfs/aio.c:955: warning: statement with no effect\n\nSigned-off-by: Randy Dunlap \u003crandy.dunlap@oracle.com\u003e\nCc: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    },
    {
      "commit": "e1ad7468c77ddb94b0615d5f50fa255525fde0f0",
      "tree": "856be1a028fece7e1fa10b7b585096839913fe2e",
      "parents": [
        "83f5d1266926c75890f1bc4678e49d79483cb573"
      ],
      "author": {
        "name": "Davide Libenzi",
        "email": "davidel@xmailserver.org",
        "time": "Thu May 10 22:23:19 2007 -0700"
      },
      "committer": {
        "name": "Linus Torvalds",
        "email": "torvalds@woody.linux-foundation.org",
        "time": "Fri May 11 08:29:36 2007 -0700"
      },
      "message": "signal/timer/event: eventfd core\n\nThis is a very simple and light file descriptor, that can be used as event\nwait/dispatch by userspace (both wait and dispatch) and by the kernel\n(dispatch only).  It can be used instead of pipe(2) in all cases where those\nwould simply be used to signal events.  Their kernel overhead is much lower\nthan pipes, and they do not consume two fds.  When used in the kernel, it can\noffer an fd-bridge to enable, for example, functionalities like KAIO or\nsyslets/threadlets to signal to an fd the completion of certain operations.\nBut more in general, an eventfd can be used by the kernel to signal readiness,\nin a POSIX poll/select way, of interfaces that would otherwise be incompatible\nwith it.  The API is:\n\nint eventfd(unsigned int count);\n\nThe eventfd API accepts an initial \"count\" parameter, and returns an eventfd\nfd.  It supports poll(2) (POLLIN, POLLOUT, POLLERR), read(2) and write(2).\n\nThe POLLIN flag is raised when the internal counter is greater than zero.\n\nThe POLLOUT flag is raised when at least a value of \"1\" can be written to the\ninternal counter.\n\nThe POLLERR flag is raised when an overflow in the counter value is detected.\n\nThe write(2) operation can never overflow the counter, since it blocks (unless\nO_NONBLOCK is set, in which case -EAGAIN is returned).\n\nBut the eventfd_signal() function can do it, since it\u0027s supposed to not sleep\nduring its operation.\n\nThe read(2) function reads the __u64 counter value, and reset the internal\nvalue to zero.  If the value read is equal to (__u64) -1, an overflow happened\non the internal counter (due to 2^64 eventfd_signal() posts that has never\nbeen retired - unlickely, but possible).\n\nThe write(2) call writes an __u64 count value, and adds it to the current\ncounter.  The eventfd fd supports O_NONBLOCK also.\n\nOn the kernel side, we have:\n\nstruct file *eventfd_fget(int fd);\nint eventfd_signal(struct file *file, unsigned int n);\n\nThe eventfd_fget() should be called to get a struct file* from an eventfd fd\n(this is an fget() + check of f_op being an eventfd fops pointer).\n\nThe kernel can then call eventfd_signal() every time it wants to post an event\nto userspace.  The eventfd_signal() function can be called from any context.\nAn eventfd() simple test and bench is available here:\n\nhttp://www.xmailserver.org/eventfd-bench.c\n\nThis is the eventfd-based version of pipetest-4 (pipe(2) based):\n\nhttp://www.xmailserver.org/pipetest-4.c\n\nNot that performance matters much in the eventfd case, but eventfd-bench\nshows almost as double as performance than pipetest-4.\n\n[akpm@linux-foundation.org: fix i386 build]\n[akpm@linux-foundation.org: add sys_eventfd to sys_ni.c]\nSigned-off-by: Davide Libenzi \u003cdavidel@xmailserver.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n"
    }
  ]
}
