<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing, branch v3.7-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/tools/testing?h=v3.7-rc5</id>
<link rel='self' href='https://git.amat.us/linux/atom/tools/testing?h=v3.7-rc5'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-11-09T05:41:46Z</updated>
<entry>
<title>revert "epoll: support for disabling items, and a self-test app"</title>
<updated>2012-11-09T05:41:46Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2012-11-08T23:53:35Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=a80a6b85b428e6ce12a8363bb1f08d44c50f3252'/>
<id>urn:sha1:a80a6b85b428e6ce12a8363bb1f08d44c50f3252</id>
<content type='text'>
Revert commit 03a7beb55b9f ("epoll: support for disabling items, and a
self-test app") pending resolution of the issues identified by Michael
Kerrisk, copied below.

We'll revisit this for 3.8.

: I've taken a look at this patch as it currently stands in 3.7-rc1, and
: done a bit of testing. (By the way, the test program
: tools/testing/selftests/epoll/test_epoll.c does not compile...)
:
: There are one or two places where the behavior seems a little strange,
: so I have a question or two at the end of this mail. But other than
: that, I want to check my understanding so that the interface can be
: correctly documented.
:
: Just to go though my understanding, the problem is the following
: scenario in a multithreaded application:
:
: 1. Multiple threads are performing epoll_wait() operations,
:    and maintaining a user-space cache that contains information
:    corresponding to each file descriptor being monitored by
:    epoll_wait().
:
: 2. At some point, a thread wants to delete (EPOLL_CTL_DEL)
:    a file descriptor from the epoll interest list, and
:    delete the corresponding record from the user-space cache.
:
: 3. The problem with (2) is that some other thread may have
:    previously done an epoll_wait() that retrieved information
:    about the fd in question, and may be in the middle of using
:    information in the cache that relates to that fd. Thus,
:    there is a potential race.
:
: 4. The race can't solved purely in user space, because doing
:    so would require applying a mutex across the epoll_wait()
:    call, which would of course blow thread concurrency.
:
: Right?
:
: Your solution is the EPOLL_CTL_DISABLE operation. I want to
: confirm my understanding about how to use this flag, since
: the description that has accompanied the patches so far
: has been a bit sparse
:
: 0. In the scenario you're concerned about, deleting a file
:    descriptor means (safely) doing the following:
:    (a) Deleting the file descriptor from the epoll interest list
:        using EPOLL_CTL_DEL
:    (b) Deleting the corresponding record in the user-space cache
:
: 1. It's only meaningful to use this EPOLL_CTL_DISABLE in
:    conjunction with EPOLLONESHOT.
:
: 2. Using EPOLL_CTL_DISABLE without using EPOLLONESHOT in
:    conjunction is a logical error.
:
: 3. The correct way to code multithreaded applications using
:    EPOLL_CTL_DISABLE and EPOLLONESHOT is as follows:
:
:    a. All EPOLL_CTL_ADD and EPOLL_CTL_MOD operations should
:       should EPOLLONESHOT.
:
:    b. When a thread wants to delete a file descriptor, it
:       should do the following:
:
:       [1] Call epoll_ctl(EPOLL_CTL_DISABLE)
:       [2] If the return status from epoll_ctl(EPOLL_CTL_DISABLE)
:           was zero, then the file descriptor can be safely
:           deleted by the thread that made this call.
:       [3] If the epoll_ctl(EPOLL_CTL_DISABLE) fails with EBUSY,
:           then the descriptor is in use. In this case, the calling
:           thread should set a flag in the user-space cache to
:           indicate that the thread that is using the descriptor
:           should perform the deletion operation.
:
: Is all of the above correct?
:
: The implementation depends on checking on whether
: (events &amp; ~EP_PRIVATE_BITS) == 0
: This replies on the fact that EPOLL_CTL_AD and EPOLL_CTL_MOD always
: set EPOLLHUP and EPOLLERR in the 'events' mask, and EPOLLONESHOT
: causes those flags (as well as all others in ~EP_PRIVATE_BITS) to be
: cleared.
:
: A corollary to the previous paragraph is that using EPOLL_CTL_DISABLE
: is only useful in conjunction with EPOLLONESHOT. However, as things
: stand, one can use EPOLL_CTL_DISABLE on a file descriptor that does
: not have EPOLLONESHOT set in 'events' This results in the following
: (slightly surprising) behavior:
:
: (a) The first call to epoll_ctl(EPOLL_CTL_DISABLE) returns 0
:     (the indicator that the file descriptor can be safely deleted).
: (b) The next call to epoll_ctl(EPOLL_CTL_DISABLE) fails with EBUSY.
:
: This doesn't seem particularly useful, and in fact is probably an
: indication that the user made a logic error: they should only be using
: epoll_ctl(EPOLL_CTL_DISABLE) on a file descriptor for which
: EPOLLONESHOT was set in 'events'. If that is correct, then would it
: not make sense to return an error to user space for this case?

Cc: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Cc: "Paton J. Lewis" &lt;palewis@adobe.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'ktest-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest</title>
<updated>2012-10-28T18:14:52Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-28T18:14:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a5210c6adaddbed823162eb76dfdbac72bdb802'/>
<id>urn:sha1:5a5210c6adaddbed823162eb76dfdbac72bdb802</id>
<content type='text'>
Pull ktest confusion fix from Steven Rostedt:
 "With the v3.7-rc2 kernel, the network cards on my target boxes were
  not being brought up.

  I found that the modules for the network was not being installed.
  This was due to the config CONFIG_MODULES_USE_ELF_RELA that came
  before CONFIG_MODULES, and confused ktest in thinking that
  CONFIG_MODULES=y was not found.

  Ktest needs to test all configs and not just stop if something starts
  with CONFIG_MODULES."

* tag 'ktest-v3.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Fix ktest confusion with CONFIG_MODULES_USE_ELF_RELA
</content>
</entry>
<entry>
<title>ktest: Fix ktest confusion with CONFIG_MODULES_USE_ELF_RELA</title>
<updated>2012-10-26T04:10:32Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-10-26T04:10:32Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8bc5e4ea3ea0e24142db2dc941233eab2a223ed4'/>
<id>urn:sha1:8bc5e4ea3ea0e24142db2dc941233eab2a223ed4</id>
<content type='text'>
In order to decide if ktest should bother installing modules on the
target box, it checks if the config file has CONFIG_MODULES=y. But it
also checks if the '=y' part exists. It only will install modules if the
config exists and is set with '=y'. But as the regex that was used
tests:

  /^CONFIG_MODULES(=y)?/

this will also match:

  CONFIG_MODULES_USE_ELF_RELA

as the '=y' part was optional and it did not test the rest of the line.
When this happens, ktest will stop checking the rest of the configs but
it will also think that no modules are needed to be installed. What it
should do is only jump out of the loop if it actually found a
CONFIG_MODULES that is set to true.

Otherwise, ktest wont install the necessary modules needed for proper
booting of the test target.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
<entry>
<title>tools/testing/selftests/epoll/test_epoll.c: fix build</title>
<updated>2012-10-25T21:37:53Z</updated>
<author>
<name>Daniel Hazelton</name>
<email>dshadowwolf@gmail.com</email>
</author>
<published>2012-10-25T20:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fc314d0a4a933603f521de343634910a4ed9b37b'/>
<id>urn:sha1:fc314d0a4a933603f521de343634910a4ed9b37b</id>
<content type='text'>
Latest Linus head run of "make selftests" in the tools directory failed
with references to undefined variables.  Reference was to
'write_thread_data' which is the name of a struct that is being used, not
the variable itself.  Change reference so it points to the variable.

Signed-off-by: Daniel Hazelton &lt;dshadowwolf@gmail.com&gt;
Cc: "Paton J. Lewis" &lt;palewis@adobe.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild</title>
<updated>2012-10-12T01:28:52Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-12T01:28:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=35e9a274fdc9c8feb763e4970a32d7089f51393c'/>
<id>urn:sha1:35e9a274fdc9c8feb763e4970a32d7089f51393c</id>
<content type='text'>
Pull kconfig changes from Michal Marek:
 "kconfig in v3.7 is going to
   - initialize ncurses only once in menuconfig
   - be able to jump to a search result in menuconfig
   - change the misnomer oldnoconfig to a more meaningful name
     olddefconfig, keeping the old name as alias"

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias
  menuconfig: Assign jump keys per-page instead of globally
  menuconfig: Do not open code textbox scroll up/down
  menuconfig: Add jump keys to search results
  menuconfig: Extend dialog_textbox so that it can return to a scrolled position
  menuconfig: Extend dialog_textbox so that it can exit on arbitrary keypresses
  menuconfig: Remove superfluous conditionnal
  kconfig: document oldnoconfig to what it really does in conf.c
  kconfig/mconf.c: revision of curses initialization.
</content>
</entry>
<entry>
<title>epoll: support for disabling items, and a self-test app</title>
<updated>2012-10-05T18:05:00Z</updated>
<author>
<name>Paton J. Lewis</name>
<email>palewis@adobe.com</email>
</author>
<published>2012-10-05T00:13:39Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=03a7beb55b9fad363f0dd33e72ccf2d3e1c2a406'/>
<id>urn:sha1:03a7beb55b9fad363f0dd33e72ccf2d3e1c2a406</id>
<content type='text'>
Enhanced epoll_ctl to support EPOLL_CTL_DISABLE, which disables an epoll
item.  If epoll_ctl doesn't return -EBUSY in this case, it is then safe to
delete the epoll item in a multi-threaded environment.  Also added a new
test_epoll self- test app to both demonstrate the need for this feature
and test it.

Signed-off-by: Paton J. Lewis &lt;palewis@adobe.com&gt;
Cc: Alexander Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: Jason Baron &lt;jbaron@redhat.com&gt;
Cc: Paul Holland &lt;pholland@adobe.com&gt;
Cc: Davide Libenzi &lt;davidel@xmailserver.org&gt;
Cc: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'ktest-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest</title>
<updated>2012-10-01T17:13:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-01T17:13:47Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=6977b4c7736e8809b7959c66875a16c0bbcf2152'/>
<id>urn:sha1:6977b4c7736e8809b7959c66875a16c0bbcf2152</id>
<content type='text'>
Pull ktest fix from Steven Rostedt:
 "ktest has one fix needed for this merge window - fix parsing of ELSE
  IF in reading config file"

* tag 'ktest-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-ktest:
  ktest: Fix ELSE IF statements
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial</title>
<updated>2012-10-01T16:06:36Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2012-10-01T16:06:36Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=99dbb1632f1165c2726056ebfce6edde0e5a0208'/>
<id>urn:sha1:99dbb1632f1165c2726056ebfce6edde0e5a0208</id>
<content type='text'>
Pull the trivial tree from Jiri Kosina:
 "Tiny usual fixes all over the place"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (34 commits)
  doc: fix old config name of kprobetrace
  fs/fs-writeback.c: cleanup riteback_sb_inodes kerneldoc
  btrfs: fix the commment for the action flags in delayed-ref.h
  btrfs: fix trivial typo for the comment of BTRFS_FREE_INO_OBJECTID
  vfs: fix kerneldoc for generic_fh_to_parent()
  treewide: fix comment/printk/variable typos
  ipr: fix small coding style issues
  doc: fix broken utf8 encoding
  nfs: comment fix
  platform/x86: fix asus_laptop.wled_type module parameter
  mfd: printk/comment fixes
  doc: getdelays.c: remember to close() socket on error in create_nl_socket()
  doc: aliasing-test: close fd on write error
  mmc: fix comment typos
  dma: fix comments
  spi: fix comment/printk typos in spi
  Coccinelle: fix typo in memdup_user.cocci
  tmiofb: missing NULL pointer checks
  tools: perf: Fix typo in tools/perf
  tools/testing: fix comment / output typos
  ...
</content>
</entry>
<entry>
<title>kconfig: replace 'oldnoconfig' with 'olddefconfig', and keep the old name as an alias</title>
<updated>2012-09-27T16:18:07Z</updated>
<author>
<name>Adam Lee</name>
<email>adam8157@gmail.com</email>
</author>
<published>2012-08-31T17:05:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=fb16d8912db5268f29706010ecafff74b971c58d'/>
<id>urn:sha1:fb16d8912db5268f29706010ecafff74b971c58d</id>
<content type='text'>
As 67d34a6a391369269a2e5dba8a5f42cc4cd50231 said, 'oldnoconfig' doesn't
set new symbols to 'n', but instead sets it to their default values.

So, this patch replaces 'oldnoconfig' with 'olddefconfig', stop making
people confused, and keep the old name 'oldnoconfig' as an alias,
because people already are dependent on its behavior with the
counter-intuitive name.

Signed-off-by: Adam Lee &lt;adam8157@gmail.com&gt;
Signed-off-by: Michal Marek &lt;mmarek@suse.cz&gt;
</content>
</entry>
<entry>
<title>ktest: Fix ELSE IF statements</title>
<updated>2012-09-26T18:48:17Z</updated>
<author>
<name>Steven Rostedt</name>
<email>srostedt@redhat.com</email>
</author>
<published>2012-09-26T18:48:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=95f57838418358e93212e9dddd60d3502c7f8e2e'/>
<id>urn:sha1:95f57838418358e93212e9dddd60d3502c7f8e2e</id>
<content type='text'>
The ELSE IF statements do not work as expected if another ELSE statement
follows. This is because the $if_set is not set. If the ELSE IF
condition is true, the following ELSE should be ignored. But because the
$if_set is not set, the following ELSE will also be executed.

Signed-off-by: Steven Rostedt &lt;rostedt@goodmis.org&gt;
</content>
</entry>
</feed>
