Linux NFS development
 help / color / mirror / Atom feed
From: "J. Bruce Fields" <bfields@fieldses.org>
To: Anirban Sinha <ASinha-z4qIPS1Syiu/3pe1ocb+swC/G2K4zDHf@public.gmane.org>
Cc: linux-nfs@vger.kernel.org
Subject: Re: nfsd restart failures without /proc/fs/nfsd filesystem mounted
Date: Tue, 1 Apr 2008 18:13:27 -0400	[thread overview]
Message-ID: <20080401221327.GH21343@fieldses.org> (raw)
In-Reply-To: <DDFD17CC94A9BD49A82147DDF7D545C59D3777-Lp/cVzEoVyb8BYCnuv3k+coc7lC+zEt2hPhL2mjWHbk@public.gmane.org>

On Tue, Apr 01, 2008 at 02:19:04PM -0700, Anirban Sinha wrote:
> Hi:
> 
> Thanks for responding. 
> 
> 
> >> And the kernel log says:
> >> [13:37:37.766844] nfsd: Could not allocate memory read-ahead cache.
> >
> >What kernel version is this?  
> 
> I am using kernel version 2.6.17.7. 
> 
> 
> > In the latest
> >fs/nfsd/vfs.c:nfsd_racache_init(int cache_size):
> >
> >	raparml = kcalloc(cache_size, sizeof(struct raparms), GFP_KERNEL);
> >
> >	if (!raparml) {
> >		printk(KERN_WARNING
> >			"nfsd: Could not allocate memory read-ahead
> >cache.\n");
> >		return -ENOMEM;
> >	}
> >
> >which is called from fs/nfsd/nfssvc.c:nfsd_svc() as:
> >
> >	error = nfsd_racache_init(2*nrservs);
> >
> >where nrservs is the number of server threads.  How many server threads
> >are you
> >trying to start, and how much memory do you have?
> 
> 
> Yea, I have seen that codebase. The configuration file /etc/init.d/nfs creates 8 nfs threads:
> 
> root:Zeugma:/etc/init.d# ps -A |grep nfs
>  2202 ?        00:00:00 nfsd
>  2203 ?        00:00:00 nfsd
>  2204 ?        00:00:00 nfsd
>  2205 ?        00:00:00 nfsd
>  2206 ?        00:00:00 nfsd
>  2207 ?        00:00:00 nfsd
>  2208 ?        00:00:00 nfsd
>  2209 ?        00:00:00 nfsd
> root:Zeugma:/etc/init.d# free
>              total       used       free     shared    buffers     cached
> Mem:        255372      34352     221020          0       2564      18720
> -/+ buffers/cache:      13068     242304
> Swap:            0          0          0
> 
> 
> The funny thing is that the moment I enable nfsd filesystem, the problem
> seems to go away.

OK, so write_svc() (hence sys_nfsservctl()) is getting garbage.  Hm.
The structure that's passed in to the kernel is:

	struct nfsctl_svc {
		unsigned short svc_port;
		int svc_nthreads;
	};

Is it at all possible that userspace and the kernel could disagree about
the layout of that structure?

Can you play with strace or insert some printk's to figure out what's
going on?

> Can you try and reproduce the problem by disabling nfsd filesystem in your
> system?

I haven't tried yet.

--b.

> 
> #> umount /proc/fs/nfsd
> 
> Ani
> 
> 
> 
> 
> >
> >--b.
> >
> >>
> >> This issue is happening on an intel platform. However, this same
> >operation succeeds on our mips platform (without nfsd filesystem). What
> >is also interesting is that once I turn on /proc/fs/nfsd filesystem on
> >Intel, the issue seems to go away.
> >>
> >> Several weeks back, I reported an issue regarding exportfs -a failure
> >on an already exported filesystem when nfsd FS was not used. It turned
> >out to be a bug in the nfsutils. Did we bump into another bug here? Is
> >there no other option but to turn on nfsd filesystem?
> >>
> >> Thanks for whoever responds to this ...
> >>
> >> Cheers,
> >>
> >> Ani
> >>
> >>
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-nfs"
> >in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2008-04-01 22:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-31 22:39 nfsd restart failures without /proc/fs/nfsd filesystem mounted Anirban Sinha
     [not found] ` <DDFD17CC94A9BD49A82147DDF7D545C59D349C-Lp/cVzEoVyb8BYCnuv3k+coc7lC+zEt2hPhL2mjWHbk@public.gmane.org>
2008-04-01 21:06   ` J. Bruce Fields
2008-04-01 21:19     ` Anirban Sinha
     [not found]       ` <DDFD17CC94A9BD49A82147DDF7D545C59D3777-Lp/cVzEoVyb8BYCnuv3k+coc7lC+zEt2hPhL2mjWHbk@public.gmane.org>
2008-04-01 22:13         ` J. Bruce Fields [this message]
2008-04-02 19:28           ` Anirban Sinha
     [not found]             ` <DDFD17CC94A9BD49A82147DDF7D545C59D3A6C-Lp/cVzEoVyb8BYCnuv3k+coc7lC+zEt2hPhL2mjWHbk@public.gmane.org>
2008-04-02 21:25               ` Anirban Sinha
     [not found]                 ` <DDFD17CC94A9BD49A82147DDF7D545C59D3B32-Lp/cVzEoVyb8BYCnuv3k+coc7lC+zEt2hPhL2mjWHbk@public.gmane.org>
2008-04-02 22:26                   ` J. Bruce Fields
2008-04-02 23:06                     ` Anirban Sinha
2008-04-01 21:24     ` Anirban Sinha
2008-04-01 22:48   ` Steve Dickson
     [not found]     ` <47F2BBDA.3080207-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-04-01 22:56       ` Anirban Sinha

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=20080401221327.GH21343@fieldses.org \
    --to=bfields@fieldses.org \
    --cc=ASinha-z4qIPS1Syiu/3pe1ocb+swC/G2K4zDHf@public.gmane.org \
    --cc=linux-nfs@vger.kernel.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