Re: [Ksummit-discuss] RFC: create mailing list "linux-issues" focussed on issues/bugs and regressions

2021-03-23 Thread Eric Wong
Konstantin Ryabitsev wrote: > On Tue, Mar 23, 2021 at 09:30:33AM -0700, James Bottomley wrote: > > > I think the bulk of user issues are going to be regressions. Although > > > you may be in a better position to know for sure, but at least for > > > me, wearing my "user" hat, the thing that gets m

Re: RFC: create mailing list "linux-issues" focussed on issues/bugs and regressions

2021-03-22 Thread Eric Wong
James Bottomley wrote: > On Mon, 2021-03-22 at 13:16 -0400, Konstantin Ryabitsev wrote: > > On Mon, Mar 22, 2021 at 04:18:14PM +0100, Thorsten Leemhuis wrote: > > > Note, there is a second reason why ksummit-discuss is CCed: another > > > reason why I want to create this new list is making it easi

Re: Why the edge-triggered mode doesn't work for epoll file descriptor?

2019-08-25 Thread Eric Wong
Heiher wrote: > Hello, > > I've added a pipe file descriptor (fd1) to an epoll (fd3) with > EPOLLOUT in edge-triggered mode, and then added the fd3 to another > epoll (fd4) with EPOLLIN in edge-triggered too. > > Next, waiting for fd4 without timeout. When fd1 to be writable, i > think epoll_wai

Re: [PATCH v4 00/14] epoll: support pollable epoll from userspace

2019-07-27 Thread Eric Wong
Andrew Morton wrote: > On Tue, 11 Jun 2019 16:54:44 +0200 Roman Penyaev wrote: > > In order to measure polling from userspace libevent was modified [1] and > > bench_http benchmark (client and server) was used: > > > > o EPOLLET, original epoll: > > > > 2 requests in 0.551306 sec. (362

Re: [PATCH v5 13/14] epoll: implement epoll_create2() syscall

2019-06-25 Thread Eric Wong
Roman Penyaev wrote: > epoll_create2() is needed to accept EPOLL_USERPOLL flags > and size, i.e. this patch wires up polling from userspace. Instead of adding a new syscall, is setting size (and/or even the EPOLL_USEREPOLL flag) something that could be done via ioctl? There's no race like CLOEXE

Re: [PATCH v5 00/14] epoll: support pollable epoll from userspace

2019-06-24 Thread Eric Wong
Roman Penyaev wrote: > Hi all, +cc Jason Baron > ** Limitations > 4. No support for EPOLLEXCLUSIVE > If device does not pass pollflags to wake_up() there is no way to > call poll() from the context under spinlock, thus special work is > scheduled to offload polling. In this s

Re: [PATCH] signal: remove the wrong signal_pending() check in restore_user_sigmask()

2019-06-04 Thread Eric Wong
Linus Torvalds wrote: > On Tue, Jun 4, 2019 at 6:41 AM Oleg Nesterov wrote: > > > > This is the minimal fix for stable, I'll send cleanups later. > > Ugh. I htink this is correct, but I wish we had a better and more > intuitive interface. I had the same thoughts, but am not a regular kernel hac

Re: [PATCH] signal: remove the wrong signal_pending() check in restore_user_sigmask()

2019-06-04 Thread Eric Wong
cked by set_user_sigmask() can > be delivered even if the caller returns success or timeout. > > Change restore_user_sigmask() to accept the additional "interrupted" > argument which should be used instead of signal_pending() check, and > u

Re: pselect/etc semantics

2019-05-30 Thread Eric Wong
"Eric W. Biederman" wrote: > Frankly the only reason this appears to be worth touching is that we > have a userspace regression. Otherwise I would call the current > behavior more correct and desirable than ignoring the signal longer. > > If I am reading sitaution properly I suggest we go back t

Re: pselect/etc semantics (Was: [PATCH v2] signal: Adjust error codes according to restore_user_sigmask())

2019-05-29 Thread Eric Wong
David Laight wrote: > From: Oleg Nesterov > > Sent: 29 May 2019 17:12 > > Al, Linus, Eric, please help. > > > > The previous discussion was very confusing, we simply can not understand > > each > > other. > > > > To me everything looks very simple and clear, but perhaps I missed something > > o

Re: [PATCH 1/1] signal: Adjust error codes according to restore_user_sigmask()

2019-05-21 Thread Eric Wong
Andrew Morton wrote: > On Tue, 21 May 2019 09:25:51 +0000 Eric Wong wrote: > > > Deepa Dinamani wrote: > > > For all the syscalls that receive a sigmask from the userland, > > > the user sigmask is to be in effect through the syscall execution. > > >

Re: [PATCH 1/1] signal: Adjust error codes according to restore_user_sigmask()

2019-05-21 Thread Eric Wong
or. If there is a signal and an error > like EINVAL, the syscalls return -EINVAL rather than the interrupted > error codes. > > The sys_io_uring_enter() seems to be returning success when there is > a signal and the queue is not empty. This seems to be a bug.

Re: [PATCH v3 05/13] epoll: offload polling to a work in case of epfd polled from userspace

2019-05-21 Thread Eric Wong
Roman Penyaev wrote: > diff --git a/fs/eventpoll.c b/fs/eventpoll.c > index 81da4571f1e0..9d3905c0afbf 100644 > --- a/fs/eventpoll.c > +++ b/fs/eventpoll.c > @@ -44,6 +44,7 @@ > #include > #include > #include > +#include > #include > > /* > @@ -185,6 +186,9 @@ struct epitem { > >

Re: [PATCH] signal: Adjust error codes according to restore_user_sigmask()

2019-05-02 Thread Eric Wong
Deepa Dinamani wrote: > Sorry, I was trying a new setup at work. I should have tested it. > My bad, I've checked this one. Thanks. This is good w.r.t. epoll_pwait and ppoll when applied to 5.0.11 (no fs/io_uring.c). Can't think of anything which uses pselect or aio on my system; but it looks ri

Re: Strange issues with epoll since 5.0

2019-05-02 Thread Eric Wong
Deepa Dinamani wrote: > Eric, > Can you please help test this? Nope, that was _really_ badly whitespace-damaged. (C'mon, it's not like you're new to this)

Re: Strange issues with epoll since 5.0

2019-05-01 Thread Eric Wong
Deepa Dinamani wrote: > So here is my analysis: > So the 854a6ed56839a40f6 seems to be better than the original code in > that it detects the signal. OTOH, does matter to anybody that a signal is detected slightly sooner than it would've been, otherwise? > But, the problem is that it doesn't

Re: Strange issues with epoll since 5.0

2019-05-01 Thread Eric Wong
Eric Wong wrote: > (didn't test AIO, but everything else seems good) "seems" != "is" Now that I understand the fix for epoll, the fs/select.c changes would hit the same problem and not return -EINTR when it should. I'll let you guys decide how to fix this, but

Re: Strange issues with epoll since 5.0

2019-04-30 Thread Eric Wong
Eric Wong wrote: > Deepa Dinamani wrote: > > I'm not sure what the hang in the userspace is about. Is it because > > the syscall did not return an error or the particular signal was > > blocked etc. > > Uh, ok; that's less comforting. Nevermind,

Re: Strange issues with epoll since 5.0

2019-04-30 Thread Eric Wong
Deepa Dinamani wrote: > I was also not able to reproduce this. > Arnd and I were talking about this today morning. Here is something > Arnd noticed: > > If there was a signal after do_epoll_wait(), we never were not > entering the if (err = -EINTR) at all before. I'm not sure which `if' statemen

Re: Strange issues with epoll since 5.0

2019-04-29 Thread Eric Wong
Davidlohr Bueso wrote: > On Sun, 28 Apr 2019, Eric Wong wrote: > > > Just running one test won't trigger since it needs a busy > > machine; but: > > > > make test/mgmt_auto_adjust.log > > (and "rm make test/mgmt_auto_adjust.log" if you

Re: Strange issues with epoll since 5.0

2019-04-27 Thread Eric Wong
Deepa Dinamani wrote: > I tried to replicate the failure on qemu. > I do not see the failure with N=32. > Does it work for N < 32? Depends on number of cores you have; I have 4 cores, 8 threads with HT; so I needed to have a lot of load on the machine to get it to fail (it takes about 1 minute).

Re: Strange issues with epoll since 5.0

2019-04-27 Thread Eric Wong
Eric Wong wrote: > Omar Kilani wrote: > > Hi there, > > > > I’m still trying to piece together a reproducible test that triggers > > this, but I wanted to post in case someone goes “hmmm... change X > > might have done this”. > > Maybe Davidlohr knows,

Re: Strange issues with epoll since 5.0

2019-04-24 Thread Eric Wong
Omar Kilani wrote: > Hi there, > > I’m still trying to piece together a reproducible test that triggers > this, but I wanted to post in case someone goes “hmmm... change X > might have done this”. Maybe Davidlohr knows, since he's responsible for most of the epoll changes in 5.0. > Basically, s

Re: [RFC] LKML Archive in Maildir Format

2019-03-06 Thread Eric Wong
Bjorn Helgaas wrote: > On Tue, Mar 5, 2019 at 5:26 PM Eric Wong wrote: > > Bjorn Helgaas wrote: > > > > Any pointers? I guess there's no mutt backend that can read a > > > public-inbox archive directly? > > > > There's mutt pat

Re: [RFC] LKML Archive in Maildir Format

2019-03-05 Thread Eric Wong
Bjorn Helgaas wrote: > OK, so I understand how to clone archives from lore.kernel.org and how > to convert a git archive to a maildir (thanks, Konstantin!) > > What I *don't* understand is how to effectively read this locally. > Ideally I'd like to run mutt, possibly with notmuch for indexing. B

Re: [PATCH][RESEND] wistron_btns needs executable BIOS image

2019-01-25 Thread Eric Wong
Jakub Bogusz wrote: > Let's try once again... (take 3) > > First time I sent this patch when I prepared it in 2013 for Linux 3.12, > the second time after update for Linux 4.12 in 2017... > And it still applies to Linux 4.20. Adding Dmitry Torokhov and linux-input to Cc: (that's what ./scripts/g

[PATCH] iommu/intel: quirk to disable DMAR for QM57 igfx

2019-01-18 Thread Eric Wong
Joonas Lahtinen wrote: > Quoting Eric Wong (2019-01-04 03:06:26) > > Yeah, so the Debian bpo 4.17(.17) kernel did not set > > CONFIG_INTEL_IOMMU_DEFAULT_ON, so I didn't encounter problems. > > My self-built kernels all set CONFIG_INTEL_IOMMU_DEFAULT_ON. > > S

Re: [PATCH] rtc: cmos: ignore bogus century byte

2019-01-10 Thread Eric Wong
Alexandre Belloni wrote: > Does this mean that it is set to an invalid value and that in is not > getting updated properly in mc146818_set_time? It seems to be set/updated without trouble while the machine is on. It's only on a cold boot (from poweroff or hibernate) that the value is invalid. P

[PATCH] rtc: cmos: ignore bogus century byte

2019-01-06 Thread Eric Wong
alues. Fixes: 3c217e51d8a272b9 ("rtc: cmos: century support") Cc: Alexandre Belloni Cc: Alessandro Zummo Cc: Sylvain Chouleur Cc: Patrick McDermott Cc: linux-...@vger.kernel.org Signed-off-by: Eric Wong --- drivers/rtc/rtc-mc146818-lib.c | 2 +- 1 file changed, 1 insertion(+), 1 de

Re: [RFC] LKML Archive in Maildir Format

2019-01-03 Thread Eric Wong
Joey Pabalinas wrote: > My only comment on the public-mailbox choice is that the documentation > is very sparse and erratic. Myself and a couple other people just > couldn't figure out how to convert that format to Maildir or some other > format you could feed into a reader like neomutt. Sorry, I

Re: iommu_intel or i915 regression in 4.18, 4.19.12 and drm-tip

2019-01-03 Thread Eric Wong
Joonas Lahtinen wrote: > Quoting Eric Wong (2018-12-27 13:49:48) > > I just got a used Thinkpad X201 (Core i5 M 520, Intel QM57 > > chipset) and hit some kernel panics while trying to view > > image/animation-intensive stuff in Firefox (X11) unless I use > > "iomm

iommu_intel or i915 regression in 4.18, 4.19.12 and drm-tip

2018-12-27 Thread Eric Wong
I just got a used Thinkpad X201 (Core i5 M 520, Intel QM57 chipset) and hit some kernel panics while trying to view image/animation-intensive stuff in Firefox (X11) unless I use "iommu_intel=igfx_off". With Debian stable backport kernels, "linux-image-4.17.0-0.bpo.3-amd64" (4.17.17-1~bpo9+1) has n

Re: [RFC PATCH 1/1] epoll: use rwlock in order to reduce ep_poll_callback() contention

2018-12-06 Thread Eric Wong
Roman Penyaev wrote: > On 2018-12-06 00:46, Eric Wong wrote: > > Roman Penyaev wrote: > > > Hi all, > > > > > > The goal of this patch is to reduce contention of ep_poll_callback() > > > which > > > can be called concurrently from differen

Re: [RFC PATCH 1/1] epoll: use rwlock in order to reduce ep_poll_callback() contention

2018-12-05 Thread Eric Wong
Roman Penyaev wrote: > Hi all, > > The goal of this patch is to reduce contention of ep_poll_callback() which > can be called concurrently from different CPUs in case of high events > rates and many fds per epoll. Problem can be very well reproduced by > generating events (write to pipe or event

[PATCH] platform/x86: thinkpad_acpi: add adaptive_kbd_modes parameter

2018-11-14 Thread Eric Wong
_L keycode 115 = Control_L NoSymbol Control_L keycode 151 = Escape NoSymbol Escape add Control = Control_L Signed-off-by: Eric Wong --- Documentation/laptops/thinkpad-acpi.txt | 11 + drivers/platform/x86/thinkpad_acpi.c| 79 ++--- 2 fi

[RFC] pipe: prevent compiler reordering in pipe_poll

2018-08-24 Thread Eric Wong
entfd_poll made by Paolo. Signed-off-by: Eric Wong Cc: Paolo Bonzini --- fs/pipe.c | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/fs/pipe.c b/fs/pipe.c index 39d6f431da83..1a904d941cf1 100644 --- a/fs/pipe.c +++ b/fs/pipe.c @@ -509,7 +50

Re: [PATCH 2/2] send-email: supply a --send-delay=1 by default

2018-03-27 Thread Eric Wong
Ævar Arnfjörð Bjarmason wrote: > Good point. I also see that (via git log --author=Ævar --grep='^\[PATCH > ') that this series itself arrived out of order (0 -> 2 -> 1), but I > don't know to what extent public-inbox itself might be batching things. public-inbox doesn't batch, aside from when the

Re: blog.cloudflare.com/the-sad-state-of-linux-socket-balancing/

2017-10-24 Thread Eric Wong
Hi Marek, I'm replying to http://blog.cloudflare.com/the-sad-state-of-linux-socket-balancing/ via email so Jason and linux-kernel see it. I also don't believe in using centralized, proprietary messaging like Disqus for discussing Open Source, nor do I deal with JavaScript. I still believe the bes

Re: BUG in git diff-index

2017-09-26 Thread Eric Wong
Marc Herbert wrote: > PS: I used NNTP and http://dir.gmane.org/gmane.comp.version-control.git > to quickly find this old thread (what could we do without NNTP?). Then > I googled for a web archive of this thread and Google could only find > this one: > http://git.661346.n2.nabble.com/BUG-in-git-d

Re: epoll_wait inaccurate timeout

2016-12-12 Thread Eric Wong
+Cc folks who may know about timer stuff on epoll. Dmitry Banschikov wrote: > Hi! > > I have a problem caused by inaccurate timeouts in epoll_wait(2). > Here are some parts of strace -tt output: Which kernel version are you using? > 22578 09:33:46.959791 epoll_wait(5, > 22578 09:33:50.010794

Re: BYD TouchPad driver (4.8.1) misdetects a Logitech mouse

2016-11-10 Thread Eric Wong
Sorry for the late response, forwarding to Dmitry and linux-input. I haven't dealt with input in years... Michael Shell wrote: > > Not a big deal, but something nonetheless ... > > I recently upgraded my kernel from 4.3 to 4.8.1 (this is a Linux From > Scratch build). There was only one obvious

Re: patch mail rejected by vger.kernel.org

2016-08-10 Thread Eric Wong
Zhouyi Zhou wrote: > Hi, > Yesterday, I cced 5 patches to linux-kernel@vger.kernel.org using > send-email, but all of them were > rejected by mail server at vger.kernel.org as follows: > "Dear yizhouz...@ict.ac.cn, Your message to linux-kernel@vger.kernel.org > was rejected by the recipient

Re: [ANNOUNCE] git-series: track changes to a patch series over time

2016-08-10 Thread Eric Wong
Josh Triplett wrote: > On August 9, 2016 11:37:31 PM HST, Richard Ipsum > wrote: > > >Maybe there's a better solution to this problem than git-candidate > >then, > >maybe we can just invent some wonderful new subcommand that fetches > >a mailing list archive into a git repo, for those that want

Re: [ANNOUNCE] git-series: track changes to a patch series over time

2016-08-01 Thread Eric Wong
Josh Triplett wrote: > On Mon, Aug 01, 2016 at 07:55:54AM +0000, Eric Wong wrote: > > Christian Couder wrote: > > > On Fri, Jul 29, 2016 at 12:10 PM, Richard Ipsum > > > wrote: > > > > On Thu, Jul 28, 2016 at 11:40:55PM -0700, Josh Triplett wrote: >

Re: [ANNOUNCE] git-series: track changes to a patch series over time

2016-08-01 Thread Eric Wong
Christian Couder wrote: > On Fri, Jul 29, 2016 at 12:10 PM, Richard Ipsum > wrote: > > On Thu, Jul 28, 2016 at 11:40:55PM -0700, Josh Triplett wrote: > > [snip] > >> > >> I'd welcome any feedback, whether on the interface and workflow, the > >> internals and collaboration, ideas on presenting dif

Re: List corruption on epoll_ctl(EPOLL_CTL_DEL) an AF_UNIX socket

2015-09-13 Thread Eric Wong
+cc Jason Baron since he might be able to provide more insight into epoll. Mathias Krause wrote: > Hi, > > this is an attempt to resurrect the thread initially started here: > > http://thread.gmane.org/gmane.linux.network/353003 > > As that patch fixed the issue for the mentioned reproducer,

Re: epoll and multiple processes - eliminate unneeded process wake-ups

2015-08-03 Thread Eric Wong
Madars Vitolins wrote: > Hi Folks, > > I am developing kind of open systems application, which uses > multiple processes/executables where each of them monitors some set > of resources (in this case POSIX Queues) via epoll interface. For > example when 10 processes on same queue are in state of e

[PATCH] ALSA: usb-audio: don't try to get Outlaw RR2150 sample rate

2015-05-30 Thread Eric Wong
-off-by: Eric Wong Cc: Joe Turner Cc: Takashi Iwai --- sound/usb/quirks.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index 32631a8..2ea5b33 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c @@ -1118,6 +1118,7 @@ bool

[RFC] net: support SOCK_DONTWAIT for non-blocking accept4

2015-05-12 Thread Eric Wong
SOCK_NONBLOCK, this does not affect the accepted socket, nor does it change the file status flag of the listen socket for other calls. Signed-off-by: Eric Wong --- RFC since this seems a bit esoteric, and I'm not sure if it'd be useful to others. I've certainly wished I've had it

[RFC] ALSA: usb-audio: reduce "cannot get freq at ep" spew

2015-03-31 Thread Eric Wong
Eric Wong wrote: > I also had another generic patch prepared before I noticed Joe's > quirk addition for the MS Lifecam HD-5000. This is the generic patch I prepared before I noticed Joe's quirk addition (applies cleanly to 3.19 and 4.0-rc6): ---

[PATCH] ALSA: usb-audio: don't try to get Benchmark DAC1 sample rate

2015-03-31 Thread Eric Wong
Pre" variant. Signed-off-by: Eric Wong Cc: Joe Turner Cc: Takashi Iwai --- I also had another generic patch prepared before I noticed Joe's quirk addition for the MS Lifecam HD-5000. sound/usb/quirks.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --g

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-21 Thread Eric Wong
Jason Baron wrote: > On 02/18/2015 12:51 PM, Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > >>> [...] However, I think the userspace API change is less > >>> clear since epoll_wait() doesn't currently have an > >>> 'input' events argument as epoll_ctl() does. > >> ... but the change would be

Re: [PATCH v2 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-18 Thread Eric Wong
Ingo Molnar wrote: > > * Ingo Molnar wrote: > > > > [...] However, I think the userspace API change is less > > > clear since epoll_wait() doesn't currently have an > > > 'input' events argument as epoll_ctl() does. > > > > ... but the change would be a bit clearer and somewhat > > more fle

Re: [PATCH 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-10 Thread Eric Wong
Jason Baron wrote: > On 02/09/2015 11:49 PM, Eric Wong wrote: > > Do you have a userland use case to share? > > I've been trying to describe the use case, maybe I haven't been doing a good > job :( Sorry, I meant if you had any public code. Anyways, I've restar

Re: [PATCH 2/2] epoll: introduce EPOLLEXCLUSIVE and EPOLLROUNDROBIN

2015-02-09 Thread Eric Wong
Jason Baron wrote: > On 02/09/2015 05:45 PM, Andy Lutomirski wrote: > > On Mon, Feb 9, 2015 at 1:32 PM, Jason Baron wrote: > >> On 02/09/2015 03:18 PM, Andy Lutomirski wrote: > >>> On 02/09/2015 12:06 PM, Jason Baron wrote: > Epoll file descriptors that are added to a shared wakeup source ar

Re: [RFC PATCH 5/5] epoll: introduce epoll connected components (remove the epmutex)

2015-01-15 Thread Eric Wong
Jason Baron wrote: > I've done a bit of performance evaluation on a dual socket, 10 core, hyper > threading enabled box: Intel(R) Xeon(R) CPU E5-2650 v3 @ 2.30GHz. For the > simple epfdN->epfdN->pipefdN topology case where each thread has its > own unique files and is doing EPOLL_CTL_ADD and EPOLL

Re: [PATCH] eventpoll: fix uninitialized variable in epoll_ctl

2014-08-20 Thread Eric Wong
quot;epoll_ctl(op=EPOLL_CTL_DEL)") > > Remove use of epds in epoll_ctl when op == EPOLL_CTL_DEL. > > Fixes: 4d7e30d98939 ("epoll: Add a flag, EPOLLWAKEUP, to prevent suspend > while epoll events are ready") > Signed-off-by: Nicolas Iooss Looks good t

Re: Does anyone know when FUTEX_WAIT can fail with EAGAIN?

2014-08-16 Thread Eric Wong
Steven Stewart-Gallus wrote: > I'm trying to debug a hangup where my program loops with FUTEX_WAIT (actually > FUTEX_WAIT_PRIVATE but same thing) endlessly erring out with EAGAIN. I would > like to know if anyone on the mailing list knows when FUTEX_WAIT can fail with > EAGAIN. FUTEX_WAIT fails

Re: eventpoll __list_del_entry corruption

2014-06-16 Thread Eric Wong
Sasha Levin wrote: > On 05/15/2014 02:11 PM, Peter Zijlstra wrote: > > On Mon, May 12, 2014 at 11:42:33AM -0400, Sasha Levin wrote: > >> Hi all, > >> > >> While fuzzing with trinity inside a KVM tools guest running the latest > >> -next > >> kernel I've stumbled on the following spew. Maybe relat

Re: [RFC PATCH for-next 2/4] epoll: epoll() syscall declaration

2014-02-25 Thread Eric Wong
Nathaniel Yazdani wrote: > On Sun, Feb 23, 2014 at 9:32 PM, Eric Wong wrote: > > Nathaniel Yazdani wrote: > >> +asmlinkage long sys_epoll(int ep, struct epoll __user *in, > >> + unsigned int inc, struct epoll __user *out, > >> +

Re: [RFC PATCH for-next 4/4] epoll: epoll() syscall definition

2014-02-25 Thread Eric Wong
Nathaniel Yazdani wrote: > + * stores triggered eventpoll entries in the 'out' array. The input array is > + * _not_ read-only, because the resulting event mask gets written back to > each > + * entry's ->ep_events field. When successful, this will be the same as > before > + * (plus EPOLLERR &

Re: [RFC PATCH for-next 2/4] epoll: epoll() syscall declaration

2014-02-23 Thread Eric Wong
Nathaniel Yazdani wrote: > +asmlinkage long sys_epoll(int ep, struct epoll __user *in, > + unsigned int inc, struct epoll __user *out, > + unsigned int outc, int timeout); I can understand using the new struct for 'in', but 'out' could just be "struct e

Re: [RFC PATCH for-next 1/4] epoll: struct epoll userspace definiton

2014-02-23 Thread Eric Wong
Nathaniel Yazdani wrote: > +++ b/include/uapi/linux/eventpoll.h > @@ -61,6 +61,12 @@ struct epoll_event { > __u64 data; > } EPOLL_PACKED; > > +struct epoll { > + int ep_fildes; /* file descriptor */ > + int ep_events; /* triggering events */ > + long long ep_ident; /* entry ID

Re: [RFC PATCH 0/3] epoll: read(),write(),ioctl() interface

2014-02-03 Thread Eric Wong
Andy Lutomirski wrote: > >> On 02/02/2014 06:17 PM, Nathaniel Yazdani wrote: > > So are you saying that those features you mentioned are specifically sought > > after for the kernel? If so I'd like to take a crack at some of them, > > may as well > > get some use out of my new knowledge of epoll i

Re: epoll oops.

2013-10-16 Thread Eric Wong
Oleg Nesterov wrote: > Yes. Before that 971316f0503a hack epoll can't even know if the task > which did signalfd_poll() exits and frees the active signalfd_wqh. > If for example that task forked a child before exit. > > And the whole RCU logic is only needed if exit/ep_remove_wait_queue > actuall

Re: [PATCH 09/11] epoll: Remove unnecessary error path

2013-09-30 Thread Eric Wong
Andi Kleen wrote: > From: Andi Kleen > > A static checker was pointing out that nothing can possible set > nwait < 0 in this path. The comment and the check appears to be > outdated. Remove it. I don't think so... > Cc: v...@zeniv.linux.org.uk > Signed-off-by: Andi Kleen > --- > fs/eventpoll

Re: [RFC] eventpoll: Move a kmem_cache_alloc and kmem_cache_free

2013-09-22 Thread Eric Wong
Jason Baron wrote: > epoll: reduce usage of global 'epmutex' lock > > Epoll file descriptors that are 1 link from a wakeup source and > are not nested within other epoll descriptors, or pointing to > other epoll descriptors, don't need to check for loop creation or > the creati

Re: [RFC] extending splice for copy offloading

2013-09-11 Thread Eric Wong
Zach Brown wrote: > Towards the end of that thread Eric Wong asked why we didn't just > extend splice. I immediately replied with some dumb dismissive > answer. Once I sat down and looked at it, though, it does make a > lot of sense. So good job, Eric. +10 Dummie points fo

Re: Problems with splice

2013-09-07 Thread Eric Wong
Mayk Eskila wrote: > Hello list, > > I intend to upgrade my own disc and partition cloning program by > using splice. When running splice-cp.c from current git on my > average dualcore hardware with kernel 3.10 I found that copying 1G > files with splice is about twice as fast as using plain vani

Re: ipv4: warnings on sk_wmem_queued

2013-09-03 Thread Eric Wong
dormando wrote: > > I noticed these warnings on stock 3.10.9 running stress tests on > > cmogstored.git (git://bogomips.org/cmogstored.git) doing standard > > HTTP server stuff between lo and tmpfs: > > > [...] > > I was going to reboot into 3.10.10 before I looked at dmesg. These > > warnings ha

Re: ipv4: warnings on sk_wmem_queued

2013-08-30 Thread Eric Wong
Eric Wong wrote: > I noticed these warnings on stock 3.10.9 running stress tests on > cmogstored.git (git://bogomips.org/cmogstored.git) doing standard > HTTP server stuff between lo and tmpfs: I'm still running the same test (in-place upgraded cmogstored a few times to fix s

ipv4: warnings on sk_wmem_queued

2013-08-30 Thread Eric Wong
I noticed these warnings on stock 3.10.9 running stress tests on cmogstored.git (git://bogomips.org/cmogstored.git) doing standard HTTP server stuff between lo and tmpfs: HTTP PUT requests hit: read(socket) + pwrite() HTTP GET requests hit: send(MSG_MORE) + sendfile() HTTP/1.1 persistent connecti

Re: [PATCH] epoll: add a reschedule point in ep_free()

2013-08-27 Thread Eric Wong
zet > Cc: Al Viro > Cc: Theodore Ts'o Seems reasonable. This isn't a remotely hot path and f_op->release runs in a workqueue nowadays (right?). Acked-by: Eric Wong -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a messag

Re: [PATCH RFC net-next] net: epoll support for busy poll

2013-08-23 Thread Eric Wong
Eliezer Tamir wrote: > I'm not sure I understand your claim that epoll has a higher latency > than poll. Nevermind, I usually live in an EPOLLONESHOT bubble so I use more epoll_ctl than "normal" epoll apps :x Anyways, good to know epoll wins over poll. Thanks. -- To unsubscribe from this list:

Re: [PATCH RFC net-next] net: epoll support for busy poll

2013-08-22 Thread Eric Wong
Eliezer Tamir wrote: > Performance: > using sockperf, Intel X520 NICs, > Supermicro 6026TT-BTF systems with E5-2690 Xeon CPUs > 100 UDP sockets avg. latency 5.756 (std-dev 0.510) > 1k UDP sockets avg. latency 5.780 (std-dev 0.536) > 10k UDP sockets avg. latency 6.269 (std-dev 0.611) How does thi

Re: strange crashes in tcp_poll() via epoll_wait

2013-07-19 Thread Eric Wong
Eric Dumazet wrote: > On Fri, 2013-07-19 at 23:50 +0000, Eric Wong wrote: > > Eric Dumazet wrote: > > > Hi Al > > > > > > I tried to debug strange crashes in tcp_poll() called from > > > sys_epoll_wait() -> sock_poll() > > > &g

Re: strange crashes in tcp_poll() via epoll_wait

2013-07-19 Thread Eric Wong
Eric Dumazet wrote: > Hi Al > > I tried to debug strange crashes in tcp_poll() called from > sys_epoll_wait() -> sock_poll() > > The symptom is that sock->sk is NULL and we therefore dereference a NULL > pointer. > > It's really rare crashes but still, it would be nice to understand where > is

Re: [RFC v0 1/4] vfs: add copy_range syscall and vfs entry point

2013-05-21 Thread Eric Wong
Zach Brown wrote: > On Wed, May 15, 2013 at 07:44:05PM +0000, Eric Wong wrote: > > Why introduce a new syscall instead of extending sys_splice? > > Personally, I think it's ugly to have different operations use the same > syscall just because their arguments match. Fair

Re: [RFC v0 1/4] vfs: add copy_range syscall and vfs entry point

2013-05-15 Thread Eric Wong
Zach Brown wrote: > This adds a syscall and vfs entry point for clone_range which offloads > data copying between existing files. > > The syscall is a thin wrapper around the vfs entry point. Its arguments > are inspired by sys_splice(). Why introduce a new syscall instead of extending sys_spli

Re: high-speed disk I/O is CPU-bound?

2013-05-10 Thread Eric Wong
Cc-ing Jens David Oostdyk wrote: > Hello, > > I have a few relatively high-end systems with hardware RAIDs which > are being used for recording systems, and I'm trying to get a better > understanding of contiguous write performance. > > The hardware that I've tested with includes two high-end I

Re: socket file descriptor a/m/c-timestamps broken in <= 3.8.8?

2013-04-22 Thread Eric Wong
Cc:-ing netdev (no comments of my own) Felix Becker wrote: > Hi, > > I tried to figure out how old my TCP connections are and took a look > at /proc//fd/ using 'ls -la' / 'stat'. > > When I'm creating a new socket in my application, the time stamps > returned by stat / ls -la are correct - as e

Re: [RFC PATCH] Linux kernel Wait-Free Concurrent Queue Implementation

2013-04-11 Thread Eric Wong
Mathieu Desnoyers wrote: > It is provided as a starting point only. Test cases should be ported > from Userspace RCU to kernel space and thoroughly ran on a wide range of > architectures before considering this port production-ready. Hi Mathieu, any progress on this front? I'm not sure how to ap

Re: [RFC PATCH] wfcqueue: implement __wfcq_enqueue_head() (v3)

2013-04-07 Thread Eric Wong
me ./eponeshotmt -c 100 -w 4 -t 4 -f 10 real0m 5.83s user0m 1.35s sys 0m 21.95s I also ran v2 on Davide Libenzi's totalmess epoll stresser for a few hours yesterday without failures. Running totalmess right now on v3, so far so good :) Tested-by: Eric Wong -- To unsubscribe from

Re: net_dropmon usage documentation/examples?

2013-04-07 Thread Eric Wong
Neil Horman wrote: > On Fri, Apr 05, 2013 at 07:38:55PM +0000, Eric Wong wrote: > > Hi Neil, I'm wondering if you have or know of any public > > documentation/examples for using net_dropmon. > > > > If not, I'll figure it out on my own at some point. >

Re: [RFC PATCH] wfcqueue: implement __wfcq_enqueue_head() (v2)

2013-04-06 Thread Eric Wong
as worried about the cmpxchg at first, but it does not seem to hurt performance on my 4-core system. In fact, it was slightly better (but within margin of error) time ./eponeshotmt -c 100 -w 4 -t 4 -f 10 real 0m 5.78s user0m 1.20s sys 0m 21.90s Tested-by: Eric Wong Hopefully somebody can

net_dropmon usage documentation/examples?

2013-04-05 Thread Eric Wong
Hi Neil, I'm wondering if you have or know of any public documentation/examples for using net_dropmon. If not, I'll figure it out on my own at some point. Thanks in advance! (Not a very high priority project for me, my network connectivity problems are sadly _very_ obvious at the moment :x) --

Re: [PATCH] wfcqueue: add function for unsynchronized prepend

2013-04-02 Thread Eric Wong
Mathieu Desnoyers wrote: > * Eric Wong (normalper...@yhbt.net) wrote: > > In some situations, it is necessary to prepend a node to a queue. > > For epoll, this is necessary for two rare conditions: > > > > * when the user triggers -EFAULT > > * when rein

[PATCH v4] epoll: avoid spinlock contention with wfcqueue

2013-04-01 Thread Eric Wong
machines with 64-byte cache line sizes (or less), this saves us from accessing the extra cache line and helps improve performance. * destroy wakeup source immediately for zombie epitems, there is no need to wait until ep_send_events. Signed-off-by: Eric Wong Cc: Davide Libenzi Cc: Al Viro C

Re: New copyfile system call - discuss before LSF?

2013-03-31 Thread Eric Wong
Pavel Machek wrote: > Eric Wong wrote: > > [1] my splice() annoyances: > > * need to create/manage a pipe > > * copy size limited by pipe size > > * doesn't reduce userspace syscalls (just data copy overhead) > > * easy to misuse and star

[PATCH] wfcqueue: add function for unsynchronized prepend

2013-03-29 Thread Eric Wong
In some situations, it is necessary to prepend a node to a queue. For epoll, this is necessary for two rare conditions: * when the user triggers -EFAULT * when reinjecting elements from the ovflist (implemented as a stack) Signed-off-by: Eric Wong Cc: Mathieu Desnoyers --- This is on top of

[PATCH -mm] epoll: cleanup: use RCU_INIT_POINTER when nulling

2013-03-28 Thread Eric Wong
It is always safe to use RCU_INIT_POINTER to NULL a pointer. This results in slightly smaller/faster code. Signed-off-by: Eric Wong Cc: Andrew Morton --- Andrew: Sorry for the noise and requiring these cleanups. Would you want a squashed commit with all my RCU+ws-related epoll changes to

Re: [PATCH] epoll: fix sparse error on RCU assignment

2013-03-28 Thread Eric Wong
Oleg Nesterov wrote: > On 03/14, Eric Wong wrote: > > Oleg Nesterov wrote: > > > On 03/10, Eric Wong wrote: > > > > > > > > This fixes the following sparse error when using > > > > CONFIG_SPARSE_RCU_POINTER=y and "make C=2 fs/

Re: I/O blocked while dirty pages are being flushed

2013-03-23 Thread Eric Wong
Fredrik Tolf wrote: > It is worth noting, also, that this seems to be a situation > introduced somewhere between 2.6.26 and 2.6.32, because I started > noticing it when I upgraded from Debian 5.0 to 6.0. I've since tried > it on 3.2.0, 3.5.4 and 3.7.1, and it appears in every version. > However, I

[PATCH v3] wfcqueue: functions for local append and enqueue

2013-03-23 Thread Eric Wong
Mathieu Desnoyers wrote: > * Eric Wong (normalper...@yhbt.net) wrote: > > /* > > + * ___wfcq_append: append one local queue to another local queue > > + * > __wfcq_append() and ___wfcq_append() are meant to be private to > wfcqueue.h. Therefore, the comment above sho

[PATCH v2] wfcqueue: functions for local append and enqueue

2013-03-23 Thread Eric Wong
-off-by: Eric Wong Cc: Mathieu Desnoyers Cc: Lai Jiangshan Cc: Paul E. McKenney Cc: Stephen Hemminger Cc: Davide Libenzi --- I noticed the original __wfcq_append function was not in the synchronization table, so I left out ___wfcq_append from the table as well. include/linux/wfcqueue.h

Re: [-next] fs/eventpoll.c:545 suspicious rcu_dereference_check() usage

2013-03-23 Thread Eric Wong
Sergey Senozhatsky wrote: > [3.163894] === > [3.163895] [ INFO: suspicious RCU usage. ] > [3.163897] 3.9.0-rc3-next-20130322-dbg-dirty #1 Not tainted > [3.163898] --- > [3.163900] fs/eventpoll.c:545 suspicious rcu_derefere

Re: [RFC v3 1/2] epoll: avoid spinlock contention with wfcqueue

2013-03-23 Thread Eric Wong
Eric Wong wrote: > Arve Hjønnevåg wrote: > > > > At some point the level triggered event has to get cleared. As far as > > I can tell, your new code will drop new events that occur between > > "revents = ep_item_poll(epi, &pt);" and "epi->stat

Re: [RFC v3 1/2] epoll: avoid spinlock contention with wfcqueue

2013-03-22 Thread Eric Wong
Arve Hjønnevåg wrote: > On Fri, Mar 22, 2013 at 3:31 AM, Eric Wong wrote: > > Arve Hjønnevåg wrote: > >> On Thu, Mar 21, 2013 at 8:24 PM, Eric Wong wrote: > >> > > >> > With EPOLLET and improper usage (not hitting EAGAIN), the event now > >> &

Re: [RFC v3 1/2] epoll: avoid spinlock contention with wfcqueue

2013-03-22 Thread Eric Wong
Eric Wong wrote: > Arve Hjønnevåg wrote: > > On Thu, Mar 21, 2013 at 8:24 PM, Eric Wong wrote: > > > > > > With EPOLLET and improper usage (not hitting EAGAIN), the event now > > > has a larger window to be lost (as mentioned in my changelog). > > >

Re: [PATCH] wfcqueue: functions for local append and enqueue

2013-03-22 Thread Eric Wong
Mathieu Desnoyers wrote: > * Eric Wong (normalper...@yhbt.net) wrote: > > /* > > + * __wfcq_append_local: append one local queue to another local queue > > + * > > + * No memory barriers are issued. Mutual exclusion is the responsibility > > + * of the caller.

  1   2   3   >