Linux NFS development
 help / color / mirror / Atom feed
From: Jens Axboe <jens.axboe@oracle.com>
To: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Allard Hoeve <allard-DW70C6hi67U@public.gmane.org>,
	linux-nfs@vger.kernel.org, "Nilssen,
	Rune" <rune.nilssen-FJFKJQU35qU@public.gmane.org>,
	Gertjan Oude Lohuis <gertjan-DW70C6hi67U@public.gmane.org>
Subject: Re: Kernel 2.6.23.17 crash (Was: Kernel (2.6.24) crash on nfsd  (BUG: soft lockup))
Date: Sat, 1 Mar 2008 18:03:23 +0100	[thread overview]
Message-ID: <20080301170322.GY6704@kernel.dk> (raw)
In-Reply-To: <20080301163944.GC19927@fieldses.org>

On Sat, Mar 01 2008, J. Bruce Fields wrote:
> On Thu, Feb 28, 2008 at 11:56:51AM +0100, Allard Hoeve wrote:
> > After trying 2.6.23.17, the same happened. The stacktrace is a bit  
> > different, but they are comparable.
> >
> > Is this an NFS problem in the first place? Where could we go for help 
> > with this problem?
> 
> Thanks for the reports!
> 
> So, the summary: several people are reporting soft lockup warnings with
> _generic_file_splice_read as the latest or next-to-latest function on
> the stack.  Sounds like 2.6.18 is good, various kernels around 2.6.23
> and 2.6.24 are reported bad.  Is it possible this was a regression
> introduced by the splice changes?

I posted this two days ago, but didn't get a reply back regarding if
anyone who can reproduce tested it?

diff --git a/fs/splice.c b/fs/splice.c
index 9b559ee..0254ec6 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -370,8 +370,10 @@ __generic_file_splice_read(struct file *in, loff_t *ppos,
 			 * for an in-flight io page
 			 */
 			if (flags & SPLICE_F_NONBLOCK) {
-				if (TestSetPageLocked(page))
+				if (TestSetPageLocked(page)) {
+					error = -EAGAIN;
 					break;
+				}
 			} else
 				lock_page(page);
 
@@ -479,9 +481,8 @@ ssize_t generic_file_splice_read(struct file *in, loff_t *ppos,
 				 struct pipe_inode_info *pipe, size_t len,
 				 unsigned int flags)
 {
-	ssize_t spliced;
-	int ret;
 	loff_t isize, left;
+	int ret;
 
 	isize = i_size_read(in->f_mapping->host);
 	if (unlikely(*ppos >= isize))
@@ -491,29 +492,9 @@ ssize_t generic_file_splice_read(struct file *in, loff_t *ppos,
 	if (unlikely(left < len))
 		len = left;
 
-	ret = 0;
-	spliced = 0;
-	while (len && !spliced) {
-		ret = __generic_file_splice_read(in, ppos, pipe, len, flags);
-
-		if (ret < 0)
-			break;
-		else if (!ret) {
-			if (spliced)
-				break;
-			if (flags & SPLICE_F_NONBLOCK) {
-				ret = -EAGAIN;
-				break;
-			}
-		}
-
+	ret = __generic_file_splice_read(in, ppos, pipe, len, flags);
+	if (ret > 0)
 		*ppos += ret;
-		len -= ret;
-		spliced += ret;
-	}
-
-	if (spliced)
-		return spliced;
 
 	return ret;
 }

-- 
Jens Axboe


  reply	other threads:[~2008-03-01 17:03 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-26 15:48 Kernel (2.6.24) crash on nfsd (BUG: soft lockup) Gertjan Oude Lohuis
     [not found] ` <47C434D2.80601-DW70C6hi67U@public.gmane.org>
2008-02-27  6:46   ` Gertjan Oude Lohuis
     [not found]     ` <47C50754.5030107-DW70C6hi67U@public.gmane.org>
2008-02-27  7:01       ` Gertjan Oude Lohuis
     [not found]         ` <47C50ABB.8050700-DW70C6hi67U@public.gmane.org>
2008-02-28 10:56           ` Kernel 2.6.23.17 crash (Was: Kernel (2.6.24) crash on nfsd (BUG: soft lockup)) Allard Hoeve
     [not found]             ` <Pine.LNX.4.62.0802281153040.31013-FHjt3+7qfYHBZBx2VKNGNcSTQT6m/s+e@public.gmane.org>
2008-03-01 16:39               ` J. Bruce Fields
2008-03-01 17:03                 ` Jens Axboe [this message]
2008-03-05 10:25                   ` Gertjan Oude Lohuis
2008-02-28 11:08   ` Kernel (2.6.24) crash on nfsd (BUG: soft lockup) Gertjan Oude Lohuis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080301170322.GY6704@kernel.dk \
    --to=jens.axboe@oracle.com \
    --cc=allard-DW70C6hi67U@public.gmane.org \
    --cc=bfields@fieldses.org \
    --cc=gertjan-DW70C6hi67U@public.gmane.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=rune.nilssen-FJFKJQU35qU@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox