[PATCH v2 4/4] signal/x86: Move nosig handling at the end of exit_to_usermode_loop.

2018-03-21 Thread NIIBE Yutaka
returning -EINTR instead, but it is too late to do so. In this patch, the function name of do_signal is changed, to avoid breakage of building User Mode Linux. Signed-off-by: NIIBE Yutaka <gni...@fsij.org> --- arch/x86/entry/common.c | 6 +- arch/x86/include/asm/signal.h | 4 +++-

[PATCH v2 4/4] signal/x86: Move nosig handling at the end of exit_to_usermode_loop.

2018-03-21 Thread NIIBE Yutaka
returning -EINTR instead, but it is too late to do so. In this patch, the function name of do_signal is changed, to avoid breakage of building User Mode Linux. Signed-off-by: NIIBE Yutaka --- arch/x86/entry/common.c | 6 +- arch/x86/include/asm/signal.h | 4 +++- arch/x86/kernel

[PATCH v2 2/4] signal/x86: do_signal: syscall restart should be done only once.

2018-03-21 Thread NIIBE Yutaka
-by: NIIBE Yutaka <gni...@fsij.org> --- arch/x86/kernel/signal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index cdfb82031243..e709b54a01b8 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -729,6 +729,7 @@ handle_

[PATCH v2 3/4] signal/x86: Move restore_saved_sigmask().

2018-03-21 Thread NIIBE Yutaka
Call to restore_saved_sigmask is only needed when it is from a system call. It is only woken up system call which uses saved_sigmask. Specifically, they are pselect, ppoll, and epoll_pwait. Signed-off-by: NIIBE Yutaka <gni...@fsij.org> --- arch/x86/kernel/signal.c | 12 ++--

[PATCH v2 1/4] signal/x86: Factor out nosig handling.

2018-03-21 Thread NIIBE Yutaka
Make a function for swing at the ball but actually no ball. Signed-off-by: NIIBE Yutaka <gni...@fsij.org> --- arch/x86/include/asm/signal.h | 1 + arch/x86/kernel/signal.c | 5 + 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/si

[PATCH v2 2/4] signal/x86: do_signal: syscall restart should be done only once.

2018-03-21 Thread NIIBE Yutaka
-by: NIIBE Yutaka --- arch/x86/kernel/signal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index cdfb82031243..e709b54a01b8 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -729,6 +729,7 @@ handle_signal(struct ksignal

[PATCH v2 3/4] signal/x86: Move restore_saved_sigmask().

2018-03-21 Thread NIIBE Yutaka
Call to restore_saved_sigmask is only needed when it is from a system call. It is only woken up system call which uses saved_sigmask. Specifically, they are pselect, ppoll, and epoll_pwait. Signed-off-by: NIIBE Yutaka --- arch/x86/kernel/signal.c | 12 ++-- 1 file changed, 6 insertions

[PATCH v2 1/4] signal/x86: Factor out nosig handling.

2018-03-21 Thread NIIBE Yutaka
Make a function for swing at the ball but actually no ball. Signed-off-by: NIIBE Yutaka --- arch/x86/include/asm/signal.h | 1 + arch/x86/kernel/signal.c | 5 + 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h index

[PATCH v2 0/4] Fix no signal delivery at do_signal

2018-03-21 Thread NIIBE Yutaka
nosig_restart_syscall when really needed * Add 'unlikely'. NIIBE Yutaka (4): signal/x86: Factor out nosig handling. signal/x86: do_signal: syscall restart should be done only once. signal/x86: Move restore_saved_sigmask(). signal/x86: Move nosig handling at the end of exit_to_usermode_loop. arch/x86

[PATCH v2 0/4] Fix no signal delivery at do_signal

2018-03-21 Thread NIIBE Yutaka
nosig_restart_syscall when really needed * Add 'unlikely'. NIIBE Yutaka (4): signal/x86: Factor out nosig handling. signal/x86: do_signal: syscall restart should be done only once. signal/x86: Move restore_saved_sigmask(). signal/x86: Move nosig handling at the end of exit_to_usermode_loop. arch/x86

[PATCH 3/4] signal/x86: Move nosig handling at the end of exit_to_usermode_loop.

2018-03-19 Thread NIIBE Yutaka
returning -EINTR instead, but it is too late to do so. Signed-off-by: NIIBE Yutaka <gni...@fsij.org> --- arch/x86/entry/common.c | 6 +- arch/x86/include/asm/signal.h | 2 +- arch/x86/kernel/signal.c | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/ar

[PATCH 3/4] signal/x86: Move nosig handling at the end of exit_to_usermode_loop.

2018-03-19 Thread NIIBE Yutaka
returning -EINTR instead, but it is too late to do so. Signed-off-by: NIIBE Yutaka --- arch/x86/entry/common.c | 6 +- arch/x86/include/asm/signal.h | 2 +- arch/x86/kernel/signal.c | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/arch/x86/entry/common.c b

[PATCH 2/4] signal/x86: do_signal: syscall restart should be done only once.

2018-03-19 Thread NIIBE Yutaka
-by: NIIBE Yutaka <gni...@fsij.org> --- arch/x86/kernel/signal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index cdfb82031243..e709b54a01b8 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -729,6 +729,7 @@ handle_

[PATCH 2/4] signal/x86: do_signal: syscall restart should be done only once.

2018-03-19 Thread NIIBE Yutaka
-by: NIIBE Yutaka --- arch/x86/kernel/signal.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kernel/signal.c b/arch/x86/kernel/signal.c index cdfb82031243..e709b54a01b8 100644 --- a/arch/x86/kernel/signal.c +++ b/arch/x86/kernel/signal.c @@ -729,6 +729,7 @@ handle_signal(struct ksignal

[PATCH 0/4] Unblocked by fake_signal_wake_up then real signal

2018-03-19 Thread NIIBE Yutaka
supports suspend/resume. NIIBE Yutaka (4): signal/x86: Factor out nosig handling. signal/x86: do_signal: syscall restart should be done only once. signal/x86: Move nosig handling at the end of exit_to_usermode_loop. signal/x86: Move restore_saved_sigmask(). arch/x86/entry/common.c

[PATCH 1/4] signal/x86: Factor out nosig handling.

2018-03-19 Thread NIIBE Yutaka
Make a function for swing at the ball and miss. Signed-off-by: NIIBE Yutaka <gni...@fsij.org> --- arch/x86/include/asm/signal.h | 1 + arch/x86/kernel/signal.c | 5 + 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h

[PATCH 1/4] signal/x86: Factor out nosig handling.

2018-03-19 Thread NIIBE Yutaka
Make a function for swing at the ball and miss. Signed-off-by: NIIBE Yutaka --- arch/x86/include/asm/signal.h | 1 + arch/x86/kernel/signal.c | 5 + 2 files changed, 6 insertions(+) diff --git a/arch/x86/include/asm/signal.h b/arch/x86/include/asm/signal.h index 5f9012ff52ed

[PATCH 0/4] Unblocked by fake_signal_wake_up then real signal

2018-03-19 Thread NIIBE Yutaka
supports suspend/resume. NIIBE Yutaka (4): signal/x86: Factor out nosig handling. signal/x86: do_signal: syscall restart should be done only once. signal/x86: Move nosig handling at the end of exit_to_usermode_loop. signal/x86: Move restore_saved_sigmask(). arch/x86/entry/common.c

[PATCH 4/4] signal/x86: Move restore_saved_sigmask().

2018-03-19 Thread NIIBE Yutaka
Call to restore_saved_sigmask is only needed when it is from a system call. It is only unblocked system call which uses saved_sigmask. Specifically, they are pselect, ppoll, and epoll_pwait. Signed-off-by: NIIBE Yutaka <gni...@fsij.org> --- arch/x86/kernel/signal.c | 12 ++--

[PATCH 4/4] signal/x86: Move restore_saved_sigmask().

2018-03-19 Thread NIIBE Yutaka
Call to restore_saved_sigmask is only needed when it is from a system call. It is only unblocked system call which uses saved_sigmask. Specifically, they are pselect, ppoll, and epoll_pwait. Signed-off-by: NIIBE Yutaka --- arch/x86/kernel/signal.c | 12 ++-- 1 file changed, 6

Re: [PATCH] swapin flush cache bug

2001-06-27 Thread NIIBE Yutaka
Hello Stephen, Stephen C. Tweedie wrote: > First, don't we want to do a flush_page_to_ram() *before* starting the > swap IO? Well, let me explain the issue. It is the thing we need to do flushing *after* I/O. -- Problem with virtually indexed physically tagged

Re: [PATCH] swapin flush cache bug

2001-06-27 Thread NIIBE Yutaka
Marcelo Tosatti wrote: > I think Stephen C. Tweedie has some considerations about the cache > flushing calls on do_swap_page(). Yup. IIRC, he said that flushing cache at do_swap_page() (which I've tried at first) is not good, because it's the hot path and it causes another performance problem

Re: [PATCH] swapin flush cache bug

2001-06-27 Thread NIIBE Yutaka
Marcelo Tosatti wrote: I think Stephen C. Tweedie has some considerations about the cache flushing calls on do_swap_page(). Yup. IIRC, he said that flushing cache at do_swap_page() (which I've tried at first) is not good, because it's the hot path and it causes another performance problem

Re: [PATCH] swapin flush cache bug

2001-06-26 Thread NIIBE Yutaka
ndling > is for swap IO too, I think a separate IO end operation for swap would be > interesting. > > (1) The current one is SetPageDecrAfter handling. How about this? I've updated MM bugzilla already. 2001-06-26 NIIBE Yutaka <[EMAIL PROTECTED]> * include/li

Re: [PATCH] swapin flush cache bug

2001-06-26 Thread NIIBE Yutaka
is for swap IO too, I think a separate IO end operation for swap would be interesting. (1) The current one is SetPageDecrAfter handling. How about this? I've updated MM bugzilla already. 2001-06-26 NIIBE Yutaka [EMAIL PROTECTED] * include/linux/mm.h (PG_flush_after

ARP handling in case of having multiple interfaces on same segment

2001-04-18 Thread NIIBE Yutaka
Sometime, we have setting like following (say, in the migration process of changing IP networks, or perhaps wrong way of load balancing): +--+ |eth0 eth1 | +--+ | | ---+---+ Current implementation of Linux doesn't handle

ARP handling in case of having multiple interfaces on same segment

2001-04-18 Thread NIIBE Yutaka
Sometime, we have setting like following (say, in the migration process of changing IP networks, or perhaps wrong way of load balancing): +--+ |eth0 eth1 | +--+ | | ---+---+ Current implementation of Linux doesn't handle

Re: [PATCH] swapin flush cache bug

2001-02-13 Thread NIIBE Yutaka
Alan Cox wrote: > Ok we need to handle that case a bit more intelligently so those flushes dont > get into other ports code paths. Possibly at fs/buffer.c:end_buffer_io_async? We need to flush the cache when I/O was READ or READA. Is there any way for end_buffer_io_async to distinguish

Re: [PATCH] swapin flush cache bug

2001-02-13 Thread NIIBE Yutaka
Russell King wrote: > Unless someone else (Rik/DaveM) says otherwise, it is my understanding > that any IO for page P will only ever be a write to disk. Therefore, > when you get a copy of the page from the swap cache, the physical memory > for that page is the same as it was when the

Re: [PATCH] swapin flush cache bug

2001-02-13 Thread NIIBE Yutaka
Russell King wrote: > What was the problem? The old code seems to behave well on a virtual > address indexed virtual address tagged cache. My case (SH-4) is: virtual address indexed, physical address tagged cache (which has alias issue). Suppose there's I/O to the physical page P

Re: [PATCH] swapin flush cache bug

2001-02-13 Thread NIIBE Yutaka
Russell King wrote: What was the problem? The old code seems to behave well on a virtual address indexed virtual address tagged cache. My case (SH-4) is: virtual address indexed, physical address tagged cache (which has alias issue). Suppose there's I/O to the physical page P

Re: [PATCH] swapin flush cache bug

2001-02-13 Thread NIIBE Yutaka
Russell King wrote: Unless someone else (Rik/DaveM) says otherwise, it is my understanding that any IO for page P will only ever be a write to disk. Therefore, when you get a copy of the page from the swap cache, the physical memory for that page is the same as it was when the process

Re: [PATCH] swapin flush cache bug

2001-02-13 Thread NIIBE Yutaka
Alan Cox wrote: Ok we need to handle that case a bit more intelligently so those flushes dont get into other ports code paths. Possibly at fs/buffer.c:end_buffer_io_async? We need to flush the cache when I/O was READ or READA. Is there any way for end_buffer_io_async to distinguish which

[PATCH] CPP ## string concatination is for the token

2001-01-12 Thread NIIBE Yutaka
I think that `##' operator for string concatination produces the token. In pci.h, we have bogus `##' operator which doesn't produce valid token. We don't need (must not) have ## between `s' and the open paren. Here's the patch. diff -ruN v2.4.1-pre3/include/linux/pci.h

[PATCH] CPP ## string concatination is for the token

2001-01-12 Thread NIIBE Yutaka
I think that `##' operator for string concatination produces the token. In pci.h, we have bogus `##' operator which doesn't produce valid token. We don't need (must not) have ## between `s' and the open paren. Here's the patch. diff -ruN v2.4.1-pre3/include/linux/pci.h

Flush_cache_page inteface (was: Re: [PATCH] Cache alias issues for swapped page)

2000-09-10 Thread NIIBE Yutaka
Russell King wrote: > Also, I believe that the use of flush_page_to_ram() is wrong here, since > this seems to be intended to be used when the kernel has been writing to > its direct mapped version of the page, which is should not have been (if > it has, then the act of writing is a bug, not

Flush_cache_page inteface (was: Re: [PATCH] Cache alias issues for swapped page)

2000-09-10 Thread NIIBE Yutaka
Russell King wrote: Also, I believe that the use of flush_page_to_ram() is wrong here, since this seems to be intended to be used when the kernel has been writing to its direct mapped version of the page, which is should not have been (if it has, then the act of writing is a bug, not the

Re: [PATCH] alignment issue with ipchains

2000-09-08 Thread NIIBE Yutaka
David S. Miller wrote: > Could you send me a patch which fixes the problem in this way? Sure. Here is the one. The occurrence of the IP_XXX corresponds the one in switch/case. Thank you for your time, --- linux-2.4.0-test8-pre6/net/ipv4/ip_sockglue.c Fri Aug 11 05:01:26 2000 +++

Re: [PATCH] alignment issue with ipchains

2000-09-08 Thread NIIBE Yutaka
Hi David, I'd like to explain my point clearly. My point is that accessing with get_user as int is questionable. In my case, it's string. I don't think all the string argment to the kernel should be aligned. David S. Miller wrote: > Why not make sure in the user tools that the argument is

[PATCH] Cache alias issues for swapped page

2000-09-08 Thread NIIBE Yutaka
For SH-4 (with virtually indexed, physically tagged cache), we have problems with swap. I think that there're bugs in do_swap_page and try_to_swap_out. I've read "Documentation/cachetlb.txt" and I know that now is the transition to newer interface, but we need a fix at the moment with old

[PATCH] alignment issue with ipchains

2000-09-08 Thread NIIBE Yutaka
With ipchains, we have alignment problem. H. Kambara <[EMAIL PROTECTED]> found that it core dumps on SuperH machine. The cause of this problem is get_user accesses wrongly in ip_setsockopt. Here's a patch, avoiding useless access. diff -ruN linux-2.4.0-test8-pre6/net/ipv4/ip_sockglue.c

[PATCH] alignment issue with ipchains

2000-09-08 Thread NIIBE Yutaka
With ipchains, we have alignment problem. H. Kambara [EMAIL PROTECTED] found that it core dumps on SuperH machine. The cause of this problem is get_user accesses wrongly in ip_setsockopt. Here's a patch, avoiding useless access. diff -ruN linux-2.4.0-test8-pre6/net/ipv4/ip_sockglue.c

[PATCH] Cache alias issues for swapped page

2000-09-08 Thread NIIBE Yutaka
For SH-4 (with virtually indexed, physically tagged cache), we have problems with swap. I think that there're bugs in do_swap_page and try_to_swap_out. I've read "Documentation/cachetlb.txt" and I know that now is the transition to newer interface, but we need a fix at the moment with old

Re: [PATCH] alignment issue with ipchains

2000-09-08 Thread NIIBE Yutaka
Hi David, I'd like to explain my point clearly. My point is that accessing with get_user as int is questionable. In my case, it's string. I don't think all the string argment to the kernel should be aligned. David S. Miller wrote: Why not make sure in the user tools that the argument is

Re: [PATCH] alignment issue with ipchains

2000-09-08 Thread NIIBE Yutaka
David S. Miller wrote: Could you send me a patch which fixes the problem in this way? Sure. Here is the one. The occurrence of the IP_XXX corresponds the one in switch/case. Thank you for your time, --- linux-2.4.0-test8-pre6/net/ipv4/ip_sockglue.c Fri Aug 11 05:01:26 2000 +++