From: Andrew Morton <akpm@digeo.com>
To: Alexey Mahotkin <alexm@hsys.msk.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] implement __GFP_REPEAT, __GFP_NOFAIL, __GFP_NORETRY
Date: Tue, 22 Apr 2003 13:10:33 -0700 [thread overview]
Message-ID: <20030422131033.6be5a66e.akpm@digeo.com> (raw)
In-Reply-To: <87bryy9usl.fsf@192.168.10.23>
Alexey Mahotkin <alexm@hsys.msk.ru> wrote:
>
>
>
> Maybe I am wrong, but recent patch added
>
> +#define __GFP_NORETRY 0x1000 /* Do not retry. Might fail */
>
>
> which conflicts numerically with
>
> #define SLAB_NO_GROW 0x00001000UL /* don't grow a cache */
>
>
> e.g., mm/slab.c contains the following snippet:
>
> if (flags & ~(SLAB_DMA|SLAB_LEVEL_MASK|SLAB_NO_GROW))
> BUG();
> if (flags & SLAB_NO_GROW)
> return 0;
>
Well spotted, thanks. This should fix it up:
diff -puN include/linux/slab.h~SLAB_NO_GROW-fix include/linux/slab.h
--- 25/include/linux/slab.h~SLAB_NO_GROW-fix Tue Apr 22 13:07:12 2003
+++ 25-akpm/include/linux/slab.h Tue Apr 22 13:08:01 2003
@@ -22,8 +22,11 @@ typedef struct kmem_cache_s kmem_cache_t
#define SLAB_KERNEL GFP_KERNEL
#define SLAB_DMA GFP_DMA
-#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|__GFP_COLD|__GFP_NOWARN|__GFP_REPEAT|__GFP_NOFAIL|__GFP_NORETRY)
-#define SLAB_NO_GROW 0x00001000UL /* don't grow a cache */
+#define SLAB_LEVEL_MASK (__GFP_WAIT|__GFP_HIGH|__GFP_IO|__GFP_FS|\
+ __GFP_COLD|__GFP_NOWARN|__GFP_REPEAT|\
+ __GFP_NOFAIL|__GFP_NORETRY)
+
+#define SLAB_NO_GROW __GFP_NO_GROW /* don't grow a cache */
/* flags to pass to kmem_cache_create().
* The first 3 are only valid when the allocator as been build
diff -puN include/linux/gfp.h~SLAB_NO_GROW-fix include/linux/gfp.h
--- 25/include/linux/gfp.h~SLAB_NO_GROW-fix Tue Apr 22 13:07:12 2003
+++ 25-akpm/include/linux/gfp.h Tue Apr 22 13:08:57 2003
@@ -31,6 +31,7 @@
#define __GFP_REPEAT 0x400 /* Retry the allocation. Might fail */
#define __GFP_NOFAIL 0x800 /* Retry for ever. Cannot fail */
#define __GFP_NORETRY 0x1000 /* Do not retry. Might fail */
+#define __GFP_NO_GROW 0x2000 /* Internal slab usage */
#define GFP_ATOMIC (__GFP_HIGH)
#define GFP_NOIO (__GFP_WAIT)
_
prev parent reply other threads:[~2003-04-22 20:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-22 19:49 Alexey Mahotkin
2003-04-22 20:10 ` Andrew Morton [this message]
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=20030422131033.6be5a66e.akpm@digeo.com \
--to=akpm@digeo.com \
--cc=alexm@hsys.msk.ru \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®