From: Jeff Layton <jlayton@redhat.com>
To: bjschuma@netapp.com
Cc: bfields@fieldses.org, linux-nfs@vger.kernel.org
Subject: Re: [PATCH 1/3] NFS: Fall back on old idmapper if request_key() fails
Date: Tue, 7 Feb 2012 14:12:54 -0500	[thread overview]
Message-ID: <20120207141254.2948e735@tlielax.poochiereds.net> (raw)
In-Reply-To: <1327614865-29322-1-git-send-email-bjschuma@netapp.com>
On Thu, 26 Jan 2012 16:54:23 -0500
bjschuma@netapp.com wrote:
> From: Bryan Schumaker <bjschuma@netapp.com>
> 
> This patch removes the CONFIG_NFS_USE_NEW_IDMAPPER compile option.
> First, the idmapper will attempt to map the id using /sbin/request-key
> and nfsidmap.  If this fails (if /etc/request-key.conf is not configured
> properly) then the idmapper will call the legacy code to perform the
> mapping.  I left a comment stating where the legacy code begins to make
> it easier for somebody to remove in the future.
> 
> Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
> ---
I think this patch is the right approach and will make the transition
easier. But there is still a bit of a problem here...
One of the main complaints about the old idmapper was that it did a
rather large allocation on every time a new nfs_client is created:
-----------------------[snip]----------------------
int
nfs_idmap_new(struct nfs_client *clp)
{
        struct idmap *idmap;
        struct rpc_pipe *pipe;
        int error;
        BUG_ON(clp->cl_idmap != NULL);
        idmap = kzalloc(sizeof(*idmap), GFP_KERNEL);
        if (idmap == NULL)
                return -ENOMEM;
-----------------------[snip]----------------------
On a 32-bit box when you try to mount and low memory is heavily
fragmented, you can get a NULL pointer back on that kzalloc with a
nice stack trace headed by a message like this:
    mount.nfs: page allocation failure. order:4, mode:0xc0d0
Here's a RHBZ against RHEL6 if you're interested in gory details:
    https://bugzilla.redhat.com/show_bug.cgi?id=730045
In any case, this problem was one of the reasons for pushing the new
idmapper. A number of people have complained about this problem in the
past and we told them "use the new idmapper". Now, with this patchset,
that won't help.
I think the right solution is to probably look at breaking up the idmap
structure in the legacy idmapper into multiple allocations. It's more
complicated to deal with and will mean restructuring the code a bit,
but it will allow for a relatively graceful transition to the new
idmapper.
Thoughts?
-- 
Jeff Layton <jlayton@redhat.com>
next prev parent reply	other threads:[~2012-02-07 19:13 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 21:54 [PATCH 1/3] NFS: Fall back on old idmapper if request_key() fails bjschuma
2012-01-26 21:54 ` [PATCH 2/3] NFS: Keep idmapper include files in one place bjschuma
2012-02-06 23:05   ` Myklebust, Trond
2012-01-26 21:54 ` [PATCH 3/3] NFS: Update idmapper documentation bjschuma
2012-01-26 21:56 ` [PATCH 1/3] NFS: Fall back on old idmapper if request_key() fails J. Bruce Fields
2012-01-26 21:57   ` Bryan Schumaker
2012-02-06 23:05 ` Myklebust, Trond
2012-02-07 15:54   ` Bryan Schumaker
2012-02-07 19:12 ` Jeff Layton [this message]
2012-02-07 19:21   ` Myklebust, Trond
2012-02-07 19:29     ` Bryan Schumaker
2012-02-07 19:44       ` Myklebust, Trond
2012-02-07 20:05         ` Myklebust, Trond
2012-02-08 12:04           ` Jeff Layton
2012-02-08 13:50             ` Myklebust, Trond
2012-02-08 18:56               ` Myklebust, Trond
2012-02-08 19:30                 ` Jeff Layton
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=20120207141254.2948e735@tlielax.poochiereds.net \
    --to=jlayton@redhat.com \
    --cc=bfields@fieldses.org \
    --cc=bjschuma@netapp.com \
    --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;
as well as URLs for NNTP newsgroup(s).