linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Streetman <ddstreet@ieee.org>
To: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Cc: Linux-MM <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Seth Jennings <sjenning@redhat.com>,
	Michal Hocko <mhocko@kernel.org>,
	Minchan Kim <minchan@kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Dan Streetman <dan.streetman@canonical.com>
Subject: Re: [PATCH 2/3] zswap: allow initialization at boot without pool
Date: Wed, 25 Jan 2017 11:36:40 -0500	[thread overview]
Message-ID: <CALZtONByh4VOUqNewmK77BNgKBzExBhiFwCJ9UTdhQREZ4f+ig@mail.gmail.com> (raw)
In-Reply-To: <20170125002426.GA2234@jagdpanzerIV.localdomain>

On Tue, Jan 24, 2017 at 7:24 PM, Sergey Senozhatsky
<sergey.senozhatsky.work@gmail.com> wrote:
>
> just a note,
>
> On (01/24/17 15:02), Dan Streetman wrote:
> [..]
>> @@ -692,6 +702,15 @@ static int __zswap_param_set(const char *val, const struct kernel_param *kp,
>>                */
>>               list_add_tail_rcu(&pool->list, &zswap_pools);
>>               put_pool = pool;
>> +     } else if (!zswap_has_pool) {
>> +             /* if initial pool creation failed, and this pool creation also
>> +              * failed, maybe both compressor and zpool params were bad.
>> +              * Allow changing this param, so pool creation will succeed
>> +              * when the other param is changed. We already verified this
>> +              * param is ok in the zpool_has_pool() or crypto_has_comp()
>> +              * checks above.
>> +              */
>> +             ret = param_set_charp(s, kp);
>>       }
>>
>>       spin_unlock(&zswap_pools_lock);
>
> looks like there still GFP_KERNEL allocation from atomic section:
> param_set_charp()->kmalloc_parameter()->kmalloc(GFP_KERNEL), under
> `zswap_pools_lock'.

thanks, it looks like the other param_set_charp above this new one has
been in the spinlock ever since i added the param callback.  I'll send
a patch.


>
>         -ss
>

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2017-01-25 16:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 20:02 [PATCH 0/3] Fix zswap init failure behavior Dan Streetman
2017-01-24 20:02 ` [PATCH 1/3] zswap: disable changing params if init fails Dan Streetman
2017-01-24 21:24   ` Andrew Morton
2017-01-24 22:12     ` Dan Streetman
2017-01-24 20:02 ` [PATCH 2/3] zswap: allow initialization at boot without pool Dan Streetman
2017-01-25  0:24   ` Sergey Senozhatsky
2017-01-25 16:36     ` Dan Streetman [this message]
2017-01-24 20:02 ` [PATCH 3/3] zswap: clear compressor or zpool param if invalid at init Dan Streetman

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=CALZtONByh4VOUqNewmK77BNgKBzExBhiFwCJ9UTdhQREZ4f+ig@mail.gmail.com \
    --to=ddstreet@ieee.org \
    --cc=akpm@linux-foundation.org \
    --cc=dan.streetman@canonical.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=minchan@kernel.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=sjenning@redhat.com \
    /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