Re: select on non-existing Kconfig option CRC32C

2016-06-15 Thread Hendrik Brueckner
Hi Andreas, On Wed, Jun 15, 2016 at 12:00:59PM +0200, Andreas Ziegler wrote: > > your patch "s390/crc32-vx: add crypto API module for optimized CRC-32 > algorithms" showed up in linux-next today (next-20160615) as commit > 364148e0b195. > > The patch defines the Kconfig option CRYPTO_CRC32_S3

Re: select on non-existing Kconfig option CRC32C

2016-06-15 Thread Randy Dunlap
On 06/15/16 03:00, Andreas Ziegler wrote: > Hi Hendrik, > > your patch "s390/crc32-vx: add crypto API module for optimized CRC-32 > algorithms" showed up in linux-next today (next-20160615) as commit > 364148e0b195. > > The patch defines the Kconfig option CRYPTO_CRC32_S390 which 'select's CRC

Re: 'select' on deleted KEYS_DEBUG_PROC_KEYS option

2016-02-03 Thread David Howells
I've posted a patch to fix this and a bunch of other refs. David

RE: 'select' on deleted KEYS_DEBUG_PROC_KEYS option

2016-01-26 Thread Dmitry Kasatkin
Hi, Yes, please make a patch. Thanks for noticing, Dmitry From: Andreas Ziegler [andreas.zieg...@fau.de] Sent: Tuesday, January 26, 2016 5:39 PM To: Dmitry Kasatkin Cc: David Howells; James Morris; Serge E. Hallyn; linux-kernel@vger.kernel.org Subject: 's

Re: Select on now-gone Kconfig option STOP_MACHINE

2016-01-25 Thread Chris Wilson
On Mon, Jan 25, 2016 at 11:52:04AM +0100, Andreas Ziegler wrote: > Hi Chris, > > your commit 5bab6f60cb4d ("drm/i915: Serialise updates to GGTT with > access through GGTT on Braswell") added a select to STOP_MACHINE to the > DRM_I915 Kconfig option. > > In 4.5-rc1, your commit 86fffe4a61dd ("kern

Re: select on undefined THERMAL_POWER_ACTOR

2015-03-04 Thread Javi Merino
Hi Valentin, On Wed, Mar 04, 2015 at 01:19:25PM +, Valentin Rothberg wrote: > your commit 8754d5115693 ("thermal: introduce the Power Allocator > governor") is included in today's linux-next tree (i.e., > next-20150304). > > This patch adds a select on the Kconfig symbol THERMAL_POWER_ACTOR.

Re: [PATCH 3/3] ACPI: Don't re-select SBS battery if it's already selected

2014-08-11 Thread xavier.gn...@gmail.com
On 14/03/2014 06:39, Lan Tianyu wrote: 2014-03-12 6:20 GMT+08:00 Matthew Garrett : The existing SBS code explicitly sets the selected battery in the SBS manager regardless of whether the battery in question is already selected. This causes bus timeouts on Apple hardware. Check for this case and

Re: [PATCH 3/3] ACPI: Don't re-select SBS battery if it's already selected

2014-03-13 Thread Lan Tianyu
2014-03-12 6:20 GMT+08:00 Matthew Garrett : > The existing SBS code explicitly sets the selected battery in the SBS > manager regardless of whether the battery in question is already selected. > This causes bus timeouts on Apple hardware. Check for this case and avoid > it. > Hi Matthew:

[PATCH 3/3] ACPI: Don't re-select SBS battery if it's already selected

2014-03-11 Thread Matthew Garrett
The existing SBS code explicitly sets the selected battery in the SBS manager regardless of whether the battery in question is already selected. This causes bus timeouts on Apple hardware. Check for this case and avoid it. Signed-off-by: Matthew Garrett --- drivers/acpi/sbs.c | 18 +-

[tip:sched/core] sched: Prevent to re-select dst-cpu in load_balance()

2013-04-24 Thread tip-bot for Joonsoo Kim
Commit-ID: e02e60c109ca70935bad1131976bdbf5160cf576 Gitweb: http://git.kernel.org/tip/e02e60c109ca70935bad1131976bdbf5160cf576 Author: Joonsoo Kim AuthorDate: Tue, 23 Apr 2013 17:27:42 +0900 Committer: Ingo Molnar CommitDate: Wed, 24 Apr 2013 08:52:46 +0200 sched: Prevent to re-select

[PATCH v3 6/6] sched: prevent to re-select dst-cpu in load_balance()

2013-04-23 Thread Joonsoo Kim
Commit 88b8dac0 makes load_balance() consider other cpus in its group. But, in that, there is no code for preventing to re-select dst-cpu. So, same dst-cpu can be selected over and over. This patch add functionality to load_balance() in order to exclude cpu which is selected once. We prevent to

Re: [PATCH v2 6/6] sched: prevent to re-select dst-cpu in load_balance()

2013-04-22 Thread Peter Zijlstra
On Tue, 2013-03-26 at 15:01 +0900, Joonsoo Kim wrote: > Commit 88b8dac0 makes load_balance() consider other cpus in its group. > But, in that, there is no code for preventing to re-select dst-cpu. > So, same dst-cpu can be selected over and over. > > This patch add functionality

[PATCH v2 6/6] sched: prevent to re-select dst-cpu in load_balance()

2013-03-25 Thread Joonsoo Kim
Commit 88b8dac0 makes load_balance() consider other cpus in its group. But, in that, there is no code for preventing to re-select dst-cpu. So, same dst-cpu can be selected over and over. This patch add functionality to load_balance() in order to exclude cpu which is selected once. We prevent to

Re: [PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance()

2013-03-20 Thread JoonSoo Kim
cpus in its group. >> > > But, in that, there is no code for preventing to re-select dst-cpu. >> > > So, same dst-cpu can be selected over and over. >> > > >> > > This patch add functionality to load_balance() in order to exclude >> > &g

Re: [PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance()

2013-03-20 Thread Peter Zijlstra
that, there is no code for preventing to re-select dst-cpu. > > > So, same dst-cpu can be selected over and over. > > > > > > This patch add functionality to load_balance() in order to exclude > > > cpu which is selected once. > > > > Oh man.. seri

Re: [PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance()

2013-03-20 Thread Joonsoo Kim
On Tue, Mar 19, 2013 at 04:05:46PM +0100, Peter Zijlstra wrote: > On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote: > > Commit 88b8dac0 makes load_balance() consider other cpus in its group. > > But, in that, there is no code for preventing to re-select dst-cpu. > > So

Re: [PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance()

2013-03-19 Thread Peter Zijlstra
On Thu, 2013-02-14 at 14:48 +0900, Joonsoo Kim wrote: > Commit 88b8dac0 makes load_balance() consider other cpus in its group. > But, in that, there is no code for preventing to re-select dst-cpu. > So, same dst-cpu can be selected over and over. > > This patch add functionality

[PATCH 7/8] sched: prevent to re-select dst-cpu in load_balance()

2013-02-13 Thread Joonsoo Kim
Commit 88b8dac0 makes load_balance() consider other cpus in its group. But, in that, there is no code for preventing to re-select dst-cpu. So, same dst-cpu can be selected over and over. This patch add functionality to load_balance() in order to exclude cpu which is selected once. Cc: Srivatsa

Re: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-06-01 Thread Uncle George
Robert Hancock wrote: It's because you haven't done anything to handle the error which is still persisting. Likely the only thing sane you can do in this case is close the fd and try to reopen it later. This seems to be true, but not for what you might think. It appears that if u plug the U

RE: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-06-01 Thread David Schwartz
> David Schwartz wrote: > >> The misunderstanding is from the docs. > >> The select() does not report device errors. > >> Select will just "more precisely, to see if a read will not block". > > This is a much slighter misunderstanding. The result of the 'select' > > function tells you nothing ab

Re: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-06-01 Thread Uncle George
David Schwartz wrote: The misunderstanding is from the docs. The select() does not report device errors. Select will just "more precisely, to see if a read will not block". This is a much slighter misunderstanding. The result of the 'select' function tells you nothing about what a particular 'r

RE: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-06-01 Thread David Schwartz
> The misunderstanding is from the docs. > The select() does not report device errors. > Select will just "more precisely, to see if a read will not block". This is a much slighter misunderstanding. The result of the 'select' function tells you nothing about what a particular 'read' will or will

Re: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-06-01 Thread Uncle George
David Schwartz wrote: David Schwartz wrote: Nope. An errored connection is always ready for read/write -- there is nothing to wait for as far as the kernel is concerned. Your code keeps asking the kernel if something interesting has happened, the kernel keeps telling it yes, and it refuses to

RE: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-06-01 Thread David Schwartz
> David Schwartz wrote: > > Nope. An errored connection is always ready for read/write -- there is > > nothing to wait for as far as the kernel is concerned. Your code keeps > > asking the kernel if something interesting has happened, the > > kernel keeps > > telling it yes, and it refuses to do

Re: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-06-01 Thread Bodo Eggert
Uncle George <[EMAIL PROTECTED]> wrote: > i am using the GARMIN_GPS/usb driver to read a gps receiver. > In testing the ability of my software to recover from various errors, I > try this: unplug the gps/USB cable from the usb hub. > > Interestingly enough the thread spins. > the SELECT() waits f

Re: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-06-01 Thread Uncle George
David Schwartz wrote: In this case what, will reset the "something interesting has happened" report from the SELECT call? Will it ever be reset in this case? Nope. An errored connection is always ready for read/write -- there is nothing to wait for as far as the kernel is concerned. Your code

Re: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-05-31 Thread Robert Hancock
Uncle George wrote: David Schwartz wrote: Nope. An errored connection is always ready for read/write -- there is nothing to wait for as far as the kernel is concerned. Your code keeps asking the kernel if something interesting has happened, the kernel keeps telling it yes, and it refuses to do

Re: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-05-31 Thread Uncle George
David Schwartz wrote: Nope. An errored connection is always ready for read/write -- there is nothing to wait for as far as the kernel is concerned. Your code keeps asking the kernel if something interesting has happened, the kernel keeps telling it yes, and it refuses to do anything about it. T

RE: SELECT() returns 1 But FIONREAD says (Input/output error)

2007-05-31 Thread David Schwartz
> i am using the GARMIN_GPS/usb driver to read a gps receiver. > In testing the ability of my software to recover from various errors, I > try this: unplug the gps/USB cable from the usb hub. > > Interestingly enough the thread spins. > the SELECT() waits for something to happen, and I get one cha

Re: select(0, ..) is valid ?

2007-05-22 Thread Steve Fox
On Tue, 2007-05-22 at 07:34 -0700, Nishanth Aravamudan wrote: > On 22.05.2007 [09:16:37 -0500], Steve Fox wrote: > > > > Andy put this through a couple machines on test.kernel.org and elm3b6 > > was fixed, however elm3b239 still had a boot error. > > > > BUG: at mm/slab.c:777 __find_general_cache

Re: select(0, ..) is valid ?

2007-05-22 Thread Nishanth Aravamudan
On 22.05.2007 [09:16:37 -0500], Steve Fox wrote: > On Wed, 2007-05-16 at 17:59 -0700, Badari Pulavarty wrote: > > > Here it is .. > > > > Should I do one for poll() also ? > > > > Thanks, > > Badari > > > > Optimize select by a using stack space for small fd sets. > > core_sys_select() already

Re: select(0, ..) is valid ?

2007-05-22 Thread Steve Fox
On Wed, 2007-05-16 at 17:59 -0700, Badari Pulavarty wrote: > Here it is .. > > Should I do one for poll() also ? > > Thanks, > Badari > > Optimize select by a using stack space for small fd sets. > core_sys_select() already has this optimization. This is > for compat version. > > Signed-off-b

Re: select(0, ..) is valid ?

2007-05-21 Thread Nish Aravamudan
On 5/18/07, Andi Kleen <[EMAIL PROTECTED]> wrote: On Wednesday 16 May 2007 17:37, Anton Blanchard wrote: > Hi Hugh, > > > It's interesting that compat_core_sys_select() shows this kmalloc(0) > > failure but core_sys_select() does not. That's because core_sys_select() > > avoids kmalloc by using

Re: select(0, ..) is valid ?

2007-05-18 Thread Andi Kleen
On Wednesday 16 May 2007 17:37, Anton Blanchard wrote: > Hi Hugh, > > > It's interesting that compat_core_sys_select() shows this kmalloc(0) > > failure but core_sys_select() does not. That's because core_sys_select() > > avoids kmalloc by using a buffer on the stack for small allocations (and > >

Re: select(0, ..) is valid ?

2007-05-16 Thread Badari Pulavarty
On Wed, 2007-05-16 at 10:37 -0500, Anton Blanchard wrote: > Hi Hugh, > > > It's interesting that compat_core_sys_select() shows this kmalloc(0) > > failure but core_sys_select() does not. That's because core_sys_select() > > avoids kmalloc by using a buffer on the stack for small allocations (and

Re: select(0, ..) is valid ?

2007-05-16 Thread Anton Blanchard
Hi Hugh, > It's interesting that compat_core_sys_select() shows this kmalloc(0) > failure but core_sys_select() does not. That's because core_sys_select() > avoids kmalloc by using a buffer on the stack for small allocations (and > 0 sure is small). Shouldn't compat_core_sys_select() do just th

Re: select(0, ..) is valid ?

2007-05-15 Thread Hugh Dickins
On Tue, 15 May 2007, Christoph Lameter wrote: > On Tue, 15 May 2007, Andrew Morton wrote: > > > I _think_ we can just do > > > > --- a/fs/compat.c~a > > +++ a/fs/compat.c > > @@ -1566,9 +1566,13 @@ int compat_core_sys_select(int n, compat > > */ > > ret = -ENOMEM; > > size = FDS_BYTE

Re: select(0, ..) is valid ?

2007-05-15 Thread Christoph Lameter
On Tue, 15 May 2007, Andrew Morton wrote: > Perhaps putting a size=0 detector into slab also would speed this > process up. Signed-off-by: Christoph Lameter <[EMAIL PROTECTED]> Index: linux-2.6/mm/slab.c === --- linux-2.6.orig/mm/sl

Re: select(0, ..) is valid ?

2007-05-15 Thread Andrew Morton
On Tue, 15 May 2007 11:10:22 -0700 (PDT) Christoph Lameter <[EMAIL PROTECTED]> wrote: > On Tue, 15 May 2007, Andrew Morton wrote: > > > I _think_ we can just do > > > > --- a/fs/compat.c~a > > +++ a/fs/compat.c > > @@ -1566,9 +1566,13 @@ int compat_core_sys_select(int n, compat > > */ > >

Re: select(0, ..) is valid ?

2007-05-15 Thread Christoph Lameter
On Tue, 15 May 2007, Andrew Morton wrote: > I _think_ we can just do > > --- a/fs/compat.c~a > +++ a/fs/compat.c > @@ -1566,9 +1566,13 @@ int compat_core_sys_select(int n, compat >*/ > ret = -ENOMEM; > size = FDS_BYTES(n); > - bits = kmalloc(6 * size, GFP_KERNEL); > -

Re: select(0, ..) is valid ?

2007-05-15 Thread Badari Pulavarty
On Tue, 2007-05-15 at 10:44 -0700, Andrew Morton wrote: > On Tue, 15 May 2007 10:29:18 -0700 > Badari Pulavarty <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > Is select(0, ..) is a valid operation ? > > Probably - it becomes an elaborate way of doing a sleep. Whatever - we > used to permit it wit

Re: select(0, ..) is valid ?

2007-05-15 Thread Andrew Morton
On Tue, 15 May 2007 10:29:18 -0700 Badari Pulavarty <[EMAIL PROTECTED]> wrote: > Hi, > > Is select(0, ..) is a valid operation ? Probably - it becomes an elaborate way of doing a sleep. Whatever - we used to permit it without error, so we should continue to do so. > I see that there is no chec

Re: select(0, ..) is valid ?

2007-05-15 Thread H. Peter Anvin
Badari Pulavarty wrote: > Hi, > > Is select(0, ..) is a valid operation ? > > I see that there is no check to prevent this or return > success early, without doing any work. Do we need one ? > > slub code is complaining that we are doing kmalloc(0). > select(0, ...) is valid, and is functional

Re: select(0, ..) is valid ?

2007-05-15 Thread Alan Cox
On Tue, 15 May 2007 10:29:18 -0700 Badari Pulavarty <[EMAIL PROTECTED]> wrote: > Hi, > > Is select(0, ..) is a valid operation ? Yes. It's a fairly classic old BSD way to do timeouts Alan - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAI

Re: select(0, ..) is valid ?

2007-05-15 Thread Jiri Slaby
Badari Pulavarty napsal(a): > Hi, > > Is select(0, ..) is a valid operation ? Yes, it was (is) sometimes used for measuring (sleeping for) short time slices. regards, -- http://www.fi.muni.cz/~xslaby/Jiri Slaby faculty of informatics, masaryk university, brno, cz e-mail: jirislaby g

Re: select(0, ..) is valid ?

2007-05-15 Thread Mark Glines
On Tue, 15 May 2007 10:29:18 -0700 Badari Pulavarty <[EMAIL PROTECTED]> wrote: > Hi, > > Is select(0, ..) is a valid operation ? select(0, ..) is rather commonly used as a portable sleep() with microsecond granularity. Disabling it will break lots of things. Mark - To unsubscribe from this lis

Re: select is evil: another reason

2007-05-10 Thread Michael Schmitz
On Wed, 9 May 2007, Russell King wrote: > drivers/net/Kconfig:2279:warning: 'select' used by config symbol 'UCC_GETH' > refers to undefined symbol 'UCC_FAST' > drivers/input/keyboard/Kconfig:170:warning: 'select' used by config symbol > 'KEYBOARD_ATARI' refers to undefined symbol 'ATARI_KBD_CORE

RE: select-like implementation for kernel sockets

2007-05-07 Thread Eitan Richardson
AM To: Robert Hancock Cc: Eitan Richardson; linux-kernel Subject: Re: select-like implementation for kernel sockets Importance: Low On 5/6/07, Robert Hancock <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: > > Hi, > > > > I'm using kernel sockets to Tx and Rx

Re: select-like implementation for kernel sockets

2007-05-06 Thread kalash nainwal
On 5/6/07, Robert Hancock <[EMAIL PROTECTED]> wrote: [EMAIL PROTECTED] wrote: > Hi, > > I'm using kernel sockets to Tx and Rx UDP packets between my hardware > device (DSP) to the external network (this is part of a VoIP > implementation). The motivation for using kernel sockets rather than > use

Re: select-like implementation for kernel sockets

2007-05-06 Thread Robert Hancock
[EMAIL PROTECTED] wrote: Hi, I'm using kernel sockets to Tx and Rx UDP packets between my hardware device (DSP) to the external network (this is part of a VoIP implementation). The motivation for using kernel sockets rather than user-space sockets is to avoid the copying of data between kernel a

Re: select() setting ERESTARTNOHAND (514).

2007-01-23 Thread Sean Reifschneider
On Thu, Jan 11, 2007 at 11:22:46PM +0100, bert hubert wrote: >Anything else relevant? Do you know which signal interrupted select? Is this >a single or multithreaded application? And where did the signal come from? It is, AFAIK, a multi-threaded application. I don't have any information on which

Re: select() setting ERESTARTNOHAND (514).

2007-01-11 Thread bert hubert
On Thu, Jan 11, 2007 at 01:25:16AM -0700, Sean Reifschneider wrote: > Nope, I haven't looked in strace at all. It's definitely making it to > user-space. The code in question is (abbreviated): > >if (select(0, (fd_set *)0, (fd_set *)0, (fd_set *)0, &t) != 0) { > PyErr_SetFromErrno(PyE

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-11 Thread Denis Vlasenko
On Thursday 11 January 2007 02:02, Neil Brown wrote: > If regs->rax is unsigned long, then I would think the compiler would > be allowed to convert > >switch (regs->rax) { > case -514 : whatever; >} > > to a no-op, as regs->rax will never have a negative value. In C, you never actu

Re: select() setting ERESTARTNOHAND (514).

2007-01-11 Thread Sean Reifschneider
On Wed, Jan 10, 2007 at 05:15:20PM -0800, David Miller wrote: >If you're only seeing it in strace, that's expected due to some Nope, I haven't looked in strace at all. It's definitely making it to user-space. The code in question is (abbreviated): if (select(0, (fd_set *)0, (fd_set *)0, (fd_

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Sean Reifschneider
On Thu, Jan 11, 2007 at 12:02:53PM +1100, Neil Brown wrote: >On Thursday January 11, [EMAIL PROTECTED] wrote: >> Normally it should be only visible in strace. Did you see it without >> strace? > >No, only in strace. I am absolutely seeing it outside of strace. It is showing up as an errno to the

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Andi Kleen
On Thursday 11 January 2007 02:02, Neil Brown wrote: > On Thursday January 11, [EMAIL PROTECTED] wrote: > > > Just a 'me too' at this point. > > > The X server on my shiny new notebook (Core 2 Duo) occasionally dies > > > with 'select' repeatedly returning ERESTARTNOHAND. It is most > > > annoyin

Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread David Miller
From: Sean Reifschneider <[EMAIL PROTECTED]> Date: Wed, 10 Jan 2007 18:04:29 -0700 > On Wed, Jan 10, 2007 at 04:27:47PM -0800, David Miller wrote: > >It gets caught by the return into userspace code. > > Ok, so somehow it is leaking. I have a system in the lab that is the same > hardware as prod

Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Sean Reifschneider
On Wed, Jan 10, 2007 at 04:27:47PM -0800, David Miller wrote: >It gets caught by the return into userspace code. Ok, so somehow it is leaking. I have a system in the lab that is the same hardware as production, but it currently has no, you know, hard drives in it, so some assembly is required. I

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Neil Brown
On Thursday January 11, [EMAIL PROTECTED] wrote: > > Just a 'me too' at this point. > > The X server on my shiny new notebook (Core 2 Duo) occasionally dies > > with 'select' repeatedly returning ERESTARTNOHAND. It is most > > annoying! > > Normally it should be only visible in strace. Did you s

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread David Miller
From: Neil Brown <[EMAIL PROTECTED]> Date: Thu, 11 Jan 2007 11:37:05 +1100 > On x86-64, regs->rax is "unsigned long", so the following is > needed > > I haven't tried it yet. Doesn't type promotion take care of that? Did you verify that assember? I checked the assembler on sparc64 for simi

Re: PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Andi Kleen
On Thursday 11 January 2007 01:37, Neil Brown wrote: > On Wednesday January 10, [EMAIL PROTECTED] wrote: > > > > In looking at the Linux code for ERESTARTNOHAND, I see that > > include/linux/errno.h says this errno should never make it to the user. > > However, in this instance we ARE seeing it.

PATCH - x86-64 signed-compare bug, was Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread Neil Brown
On Wednesday January 10, [EMAIL PROTECTED] wrote: > > In looking at the Linux code for ERESTARTNOHAND, I see that > include/linux/errno.h says this errno should never make it to the user. > However, in this instance we ARE seeing it. Looking around on google shows > others are seeing it as well,

Re: select() setting ERESTARTNOHAND (514).

2007-01-10 Thread David Miller
From: Sean Reifschneider <[EMAIL PROTECTED]> Date: Wed, 10 Jan 2007 16:42:38 -0700 > In looking at the select() code, I see that there are definitely cases > where sys_select() or sys_pselect7() can return -ERESTARTNOHAND. However, > I don't know if this is expected to be caught elsewhere, or if

Re: select() efficiency / epoll

2005-08-24 Thread Davy Durham
Davide Libenzi wrote: There is no known problem in using epoll_ctl() in one thread while another does epoll_wait(). I suggest you to ask Valgrind to take a look at you binary. Since I have no clue of what your software does, please create the *minimal* code snippet that exploit the eventual

Re: select() efficiency / epoll

2005-08-23 Thread Davide Libenzi
On Tue, 23 Aug 2005, Davy Durham wrote: Davide Libenzi wrote: I should mention that the 2.4 patch is old WRT mainline epoll in 2.6 (I stopped maintaining it when 2.6 went "stable"). I'd definitely suggest to use 2.6 if you are looking at epoll. I am using linux-2.6.11 and glibc-2.3.4 ..

Re: select() efficiency / epoll

2005-08-23 Thread Davy Durham
Jari Sundell wrote: On 8/23/05, Davy Durham <[EMAIL PROTECTED]> wrote: I was hoping you would mention in your reply that you knew epoll_data_t was an union and you didn't touch epoll_data::fd, so i wouldn't have to say it explicitly. ;) Oh!.. unless the epoll_data_t is a union just for

Re: select() efficiency / epoll

2005-08-23 Thread Davy Durham
Jari Sundell wrote: On 8/23/05, Davy Durham <[EMAIL PROTECTED]> wrote: I was hoping you would mention in your reply that you knew epoll_data_t was an union and you didn't touch epoll_data::fd, so i wouldn't have to say it explicitly. ;) No, I saw that epoll_data_t was a union (although,

Re: select() efficiency / epoll

2005-08-23 Thread Davy Durham
Davide Libenzi wrote: I should mention that the 2.4 patch is old WRT mainline epoll in 2.6 (I stopped maintaining it when 2.6 went "stable"). I'd definitely suggest to use 2.6 if you are looking at epoll. I am using linux-2.6.11 and glibc-2.3.4 .. and using select() in it's place seems to

Re: select() efficiency / epoll

2005-08-23 Thread Davide Libenzi
On Tue, 23 Aug 2005, Willy Tarreau wrote: On Tue, Aug 23, 2005 at 06:55:26AM -0500, Davy Durham wrote: Thanks for the info.. I did find this thread and was wondering if this patch ever got put in http://www.ussg.iu.edu/hypermail/linux/kernel/0303.3/1139.html Interesting ! At least it does n

Re: select() efficiency / epoll

2005-08-23 Thread Jari Sundell
On 8/23/05, Davy Durham <[EMAIL PROTECTED]> wrote: > Yes, that is what I was thinking and is why I mentioned that. But I'm > apparently not overwriting the pointers with FDs.. it seems that epoll > is the cause at this point (unless I'm misusing the epoll API). I've > made some changes to now us

Re: select() efficiency / epoll

2005-08-23 Thread Willy Tarreau
On Tue, Aug 23, 2005 at 06:55:26AM -0500, Davy Durham wrote: > Thanks for the info.. I did find this thread and was wondering if this > patch ever got put in > > http://www.ussg.iu.edu/hypermail/linux/kernel/0303.3/1139.html > Interesting ! At least it does not seem to be present in the epoll-2

Re: select() efficiency / epoll

2005-08-23 Thread Davy Durham
Thanks for the info.. I did find this thread and was wondering if this patch ever got put in http://www.ussg.iu.edu/hypermail/linux/kernel/0303.3/1139.html Willy Tarreau wrote: On Tue, Aug 23, 2005 at 06:24:42AM -0500, Davy Durham wrote: That's probably a good idea. Where would I find o

Re: select() efficiency / epoll

2005-08-23 Thread Davy Durham
Jari Sundell wrote: On 8/23/05, Davy Durham <[EMAIL PROTECTED]> wrote: However, I'm getting segfaults because some pointers in places are getting set to low integer values (which didn't used to have those values). Is it possible that you are overwritting the pointers with file descrip

Re: select() efficiency / epoll

2005-08-23 Thread Willy Tarreau
On Tue, Aug 23, 2005 at 06:24:42AM -0500, Davy Durham wrote: > That's probably a good idea. Where would I find out what other projects > use it? I use it in my load-balancer (haproxy), and it could somewhat match your needs, because I ported the select()-based earlier version to epoll() with the

Re: select() efficiency / epoll

2005-08-23 Thread Jari Sundell
On 8/23/05, Davy Durham <[EMAIL PROTECTED]> wrote: > > However, I'm getting segfaults because some pointers in places are > getting set to low integer values (which didn't used to have those values). Is it possible that you are overwritting the pointers with file descriptors, as those would have

Re: select() efficiency / epoll

2005-08-23 Thread Davy Durham
That's probably a good idea. Where would I find out what other projects use it? Willy Tarreau wrote: Hi, On Tue, Aug 23, 2005 at 06:01:15AM -0500, Davy Durham wrote: I just mean that when I debug and catch the segv, it's dies because some pointers now have corrupted values. (usually be

Re: select() efficiency / epoll

2005-08-23 Thread Davy Durham
Davy Durham wrote: I'm currently re-writing some code to make it use select() instead of epoll_wait() and see if everything is suddently fixed. If so, then I will suspect that epoll has a problem. But it's still not ruled out being my fault since it could be a timing issue that makes the c

Re: select() efficiency / epoll

2005-08-23 Thread Willy Tarreau
Hi, On Tue, Aug 23, 2005 at 06:01:15AM -0500, Davy Durham wrote: > I just mean that when I debug and catch the segv, it's dies because > some pointers now have corrupted values. (usually because something is > overwriting some memory some where) > > I'm currently re-writing some code to make

Re: select() efficiency / epoll

2005-08-23 Thread Davy Durham
bert hubert wrote: On Tue, Aug 23, 2005 at 04:49:14AM -0500, Davy Durham wrote: However, I'm getting segfaults because some pointers in places are getting set to low integer values (which didn't used to have those values). epoll is pretty heavily benchmarked and hence tested. I don't

Re: select() efficiency / epoll

2005-08-23 Thread bert hubert
On Tue, Aug 23, 2005 at 04:49:14AM -0500, Davy Durham wrote: > However, I'm getting segfaults because some pointers in places are > getting set to low integer values (which didn't used to have those values). epoll is pretty heavily benchmarked and hence tested. I don't entirely understand the re

Re: select() efficiency / epoll

2005-08-23 Thread Davy Durham
So, I've been trying to use epoll.. on linux-2.6.11-6mdk However, I'm getting segfaults because some pointers in places are getting set to low integer values (which didn't used to have those values). The deal is that my application is multi-threaded, and I was wondering if epoll had issues i

Re: select() efficiency

2005-07-22 Thread bert hubert
On Fri, Jul 22, 2005 at 04:18:46PM -0500, Davy Durham wrote: > Please forgive and redirect me if this is not the right place to ask > this question: > > I'm looking to write a sort of messaging system that would take input > from any number of entities that "register" with it.. it would then >

Re: select() not returning though pipe became readable

2005-03-31 Thread Lutz Vieweg
Lutz Vieweg <[EMAIL PROTECTED]> wrote: I'm currently investigating the following problem, which seems to indicate a misbehaviour of the kernel: A server software we implemented is sporadically "hanging" in a select() call since we upgraded from kernel 2.4 to (currently) 2.6.9 (we have to wait for 2

Re: select() not returning though pipe became readable

2005-03-30 Thread Lutz Vieweg
Andrew Morton wrote: Lutz Vieweg <[EMAIL PROTECTED]> wrote: I'm currently investigating the following problem, which seems to indicate a misbehaviour of the kernel: A server software we implemented is sporadically "hanging" in a select() call since we upgraded from kernel 2.4 to (currently) 2.6.9 (

Re: select() not returning though pipe became readable

2005-03-24 Thread Andrew Morton
Lutz Vieweg <[EMAIL PROTECTED]> wrote: > > I'm currently investigating the following problem, which seems to indicate > a misbehaviour of the kernel: > > A server software we implemented is sporadically "hanging" in a select() > call since we upgraded from kernel 2.4 to (currently) 2.6.9 (we have

RE: select() doesn't respect SO_RCVLOWAT ?

2005-03-21 Thread Robert White
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Felix Matathias Sent: Friday, March 11, 2005 12:27 PM > Isn't a significant reduction in the amount of read operations > a real gain in high speed networking ? In a word? No. Here at my company we make

Re: select() doesn't respect SO_RCVLOWAT ?

2005-03-14 Thread YOSHIFUJI Hideaki / 吉藤英明
In article <[EMAIL PROTECTED]> (at Mon, 14 Mar 2005 13:24:24 +), Alan Cox <[EMAIL PROTECTED]> says: > 1003.1g both agree with your expectations. The right list is probably > netdev@oss.sgi.com however. I've just forwarded this thread to netdev. --yoshfuji - To unsubscribe from this list: se

Re: select() doesn't respect SO_RCVLOWAT ?

2005-03-14 Thread Alan Cox
On Gwe, 2005-03-11 at 20:26, Felix Matathias wrote: > Dear Alan, > > I am positive. I can setsockopt, and then, getsockopt returns the value > that I requested. Ok I misremembered - its SNDLOWAT that is locked to one in Linux. > Stevens very clearly states that SO_RCVLOWAT has a direct impact o

Re: select() doesn't respect SO_RCVLOWAT ?

2005-03-11 Thread Felix Matathias
Dear Alan, I am positive. I can setsockopt, and then, getsockopt returns the value that I requested. Stevens very clearly states that SO_RCVLOWAT has a direct impact on select() and I assumed that this would be the case for Linux. What is the rationale for not complying with that ? Is it the mic

Re: select() doesn't respect SO_RCVLOWAT ?

2005-03-11 Thread Alan Cox
On Iau, 2005-03-10 at 21:58, Felix Matathias wrote: > Dear all, > > I am running a 2.4.21-9.0.3.ELsmp #1 kernel and I can setsockopt and > getsockopt correctly the SO_RCVLOWAT option The only value the code at least used to support was setting it to 1. Are you sure you are actually setting/check

Re: select() doesn't respect SO_RCVLOWAT ?

2005-03-10 Thread Willy Tarreau
On Thu, Mar 10, 2005 at 04:58:51PM -0500, Felix Matathias wrote: > > I am running a 2.4.21-9.0.3.ELsmp #1 kernel and I can setsockopt and > getsockopt correctly the SO_RCVLOWAT option, but select() seems to mark a > socket readable even if a single byte is ready to be read. Then, a read() > blo

Re: select(2), usbserial, tty's and disconnect

2005-03-09 Thread Joerg Pommnitz
Robert Hancock wrote: > I thought this (hangup on remove [jpo]) had been merged, but I could be > wrong. I just checked bitkeeper. The patch went in some time ago: 4 months eolson 1.126 usb-serial: add tty_hangup on disconnect Regards Joerg ___

Re: select(2), usbserial, tty's and disconnect

2005-03-09 Thread Joerg Pommnitz
Robert Hancock wrote: > There was discussion at one point about doing a tty_hangup() when the > USB device was disconnected (this causes the read() to return with 0 > > bytes and future open attempts to fail), and a patch was put out to do > this. I thought this had been merged, but I could be

Re: select(2), usbserial, tty's and disconnect

2005-03-08 Thread Robert Hancock
Joerg Pommnitz wrote: Hello all, currently it seems that select keeps blocking when the USB device behind ttyUSBx gets unplugged. My understanding is, that select should return when the next call to one of the operations (read/write) will not block. This is certainly true for failing with ENODEV. S

Re: select(2), usbserial, tty's and disconnect

2005-03-08 Thread linux-os
On Tue, 8 Mar 2005, Joerg Pommnitz wrote: Hello all, currently it seems that select keeps blocking when the USB device behind ttyUSBx gets unplugged. My understanding is, that select should return when the next call to one of the operations (read/write) will not block. This is certainly true for fa

RE: select() - Linux vs. BSD

2001-06-03 Thread David Schwartz
> I would have said just the opposite. That if it you have a large > number of > handles you're waiting on, and you have to go back through and > set the bits > everytime you timeout that you would incur a larger overhead. From the > perspective of my application, it would have been more effici

Re: select() - Linux vs. BSD

2001-06-02 Thread Mike Castle
On Sat, Jun 02, 2001 at 10:47:49PM -0400, John Chris Wren wrote: > I would have said just the opposite. That if it you have a large number of > handles you're waiting on, and you have to go back through and set the bits > everytime you timeout that you would incur a larger overhead. From the Us

RE: select() - Linux vs. BSD

2001-06-02 Thread John Chris Wren
> > [EMAIL PROTECTED] wrote: > > Of course, not looking at the sets upon a zero return is a > fairly obvious > > optimization as there is little point in doing so. > > No; a fairly obvious optimisation is to avoid calling FD_ZERO if you > can clear the bits individually when you test them. > > Wh

Re: select() - Linux vs. BSD

2001-06-02 Thread lost
On Sat, 2 Jun 2001, Jamie Lokier wrote: > [EMAIL PROTECTED] wrote: > > Of course, not looking at the sets upon a zero return is a fairly obvious > > optimization as there is little point in doing so. > > No; a fairly obvious optimisation is to avoid calling FD_ZERO if you > can clear the bits in

Re: select() - Linux vs. BSD

2001-06-02 Thread Jamie Lokier
[EMAIL PROTECTED] wrote: > Of course, not looking at the sets upon a zero return is a fairly obvious > optimization as there is little point in doing so. No; a fairly obvious optimisation is to avoid calling FD_ZERO if you can clear the bits individually when you test them. When you examine the

  1   2   >