All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: Tejun Heo <tj@kernel.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 67/77] dlm: convert to idr_alloc()
Date: Mon, 11 Mar 2013 15:29:55 -0400	[thread overview]
Message-ID: <20130311192955.GA23892@redhat.com> (raw)
In-Reply-To: <1360179649-22465-68-git-send-email-tj@kernel.org>

On Wed, Feb 06, 2013 at 11:40:39AM -0800, Tejun Heo wrote:
>  static int create_lkb(struct dlm_ls *ls, struct dlm_lkb **lkb_ret)
>  {
>  	struct dlm_lkb *lkb;
> -	int rv, id;
> +	int rv;
>  
>  	lkb = dlm_allocate_lkb(ls);
>  	if (!lkb)
> @@ -1199,19 +1199,13 @@ static int create_lkb(struct dlm_ls *ls, struct dlm_lkb **lkb_ret)
>  	mutex_init(&lkb->lkb_cb_mutex);
>  	INIT_WORK(&lkb->lkb_cb_work, dlm_callback_work);
>  
> - retry:
> -	rv = idr_pre_get(&ls->ls_lkbidr, GFP_NOFS);
> -	if (!rv)
> -		return -ENOMEM;
> -
> +	idr_preload(GFP_NOFS);
>  	spin_lock(&ls->ls_lkbidr_spin);
> -	rv = idr_get_new_above(&ls->ls_lkbidr, lkb, 1, &id);
> -	if (!rv)
> -		lkb->lkb_id = id;
> +	rv = idr_alloc(&ls->ls_lkbidr, lkb, 1, 0, GFP_NOWAIT);

Hi Tejun,
I'm seeing a number of new failure/warning messages within this idr_alloc.
I've not seen idr_alloc itself return an error yet.  Is this an expected
failure where the warnings should be suppressed?
Dave

kworker/u:3: page allocation failure: order:1, mode:0x200000
Pid: 181, comm: kworker/u:3 Not tainted 3.9.0-rc2+ #1
Call Trace:
 [<ffffffff810c870b>] warn_alloc_failed+0xeb/0x150
 [<ffffffff8105f91e>] ? __wake_up+0x4e/0x70
 [<ffffffff810ca626>] __alloc_pages_nodemask+0x666/0x930
 [<ffffffff810ca626>] ? __alloc_pages_nodemask+0x666/0x930
 [<ffffffff811031ff>] kmem_getpages+0x5f/0x1b0
 [<ffffffff81103e33>] fallback_alloc+0x173/0x250
 [<ffffffff81103be3>] ____cache_alloc_node+0x93/0x170
 [<ffffffff811035f8>] ? cache_alloc_refill+0x2a8/0x310
 [<ffffffff81104e59>] kmem_cache_alloc+0xd9/0x130
 [<ffffffff811da11c>] idr_layer_alloc+0x2c/0x80
 [<ffffffff811dac8c>] idr_get_empty_slot+0x2ec/0x390
 [<ffffffff811db0ad>] idr_alloc+0x4d/0xc0
 [<ffffffffa031ded2>] create_lkb+0x122/0x180 [dlm]
 [<ffffffffa03232a4>] receive_request+0x34/0x440 [dlm]
 [<ffffffffa0331f07>] ? dlm_wait_requestqueue+0x37/0x60 [dlm]
 [<ffffffffa0326aac>] _receive_message+0x67c/0x1050 [dlm]
 [<ffffffff81425f39>] ? mutex_unlock+0x9/0x10
 [<ffffffffa0327605>] dlm_receive_buffer+0x185/0x200 [dlm]
 [<ffffffffa032ab7f>] dlm_process_incoming_buffer+0xef/0x210 [dlm]
 [<ffffffffa032c5cc>] receive_from_sock+0x1ac/0x430 [dlm]
 [<ffffffffa032aee9>] process_recv_sockets+0x29/0x40 [dlm]
 [<ffffffff8104e0d7>] process_one_work+0x1c7/0x460
 [<ffffffff8104e071>] ? process_one_work+0x161/0x460
 [<ffffffff8105124d>] worker_thread+0x11d/0x3e0
 [<ffffffff81051130>] ? manage_workers+0x340/0x340
 [<ffffffff81056606>] kthread+0xe6/0xf0
 [<ffffffff81056520>] ? __init_kthread_worker+0x70/0x70
 [<ffffffff8142feec>] ret_from_fork+0x7c/0xb0
 [<ffffffff81056520>] ? __init_kthread_worker+0x70/0x70
Mem-Info:
Node 0 DMA per-cpu:
CPU    0: hi:    0, btch:   1 usd:   0
CPU    1: hi:    0, btch:   1 usd:   0
CPU    2: hi:    0, btch:   1 usd:   0
CPU    3: hi:    0, btch:   1 usd:   0
Node 0 DMA32 per-cpu:
CPU    0: hi:  186, btch:  31 usd: 163
CPU    1: hi:  186, btch:  31 usd: 161
CPU    2: hi:  186, btch:  31 usd: 183
CPU    3: hi:  186, btch:  31 usd:  53
Node 1 DMA32 per-cpu:
CPU    0: hi:  186, btch:  31 usd:   0
CPU    1: hi:  186, btch:  31 usd:   0
CPU    2: hi:  186, btch:  31 usd: 191
CPU    3: hi:  186, btch:  31 usd: 166
Node 1 Normal per-cpu:
CPU    0: hi:  186, btch:  31 usd:   0
CPU    1: hi:  186, btch:  31 usd:  32
CPU    2: hi:  186, btch:  31 usd: 162
CPU    3: hi:  186, btch:  31 usd: 222
active_anon:4222 inactive_anon:8075 isolated_anon:0
 active_file:511976 inactive_file:334346 isolated_file:0
 unevictable:7742 dirty:0 writeback:0 unstable:0
 free:6682 slab_reclaimable:68508 slab_unreclaimable:62477
 mapped:8263 shmem:7537 pagetables:913 bounce:0
 free_cma:0
Node 0 DMA free:7912kB min:28kB low:32kB high:40kB active_anon:0kB inactive_anon:0kB active_file:7376kB inactive_file:256kB unevictable:24kB isolated(anon):0kB isolated(file):0kB present:15972kB managed:15884kB mlocked:24kB dirty:0kB writeback:0kB mapped:24kB shmem:24kB slab_reclaimable:296kB slab_unreclaimable:20kB kernel_stack:0kB pagetables:0kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 1971 1971 1971
Node 0 DMA32 free:7560kB min:4016kB low:5020kB high:6024kB active_anon:7868kB inactive_anon:22228kB active_file:1034116kB inactive_file:727656kB unevictable:1720kB isolated(anon):0kB isolated(file):0kB present:2080768kB managed:2019104kB mlocked:1720kB dirty:0kB writeback:0kB mapped:18188kB shmem:15648kB slab_reclaimable:101792kB slab_unreclaimable:110520kB kernel_stack:792kB pagetables:1632kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:0 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
Node 1 DMA32 free:7928kB min:1952kB low:2440kB high:2928kB active_anon:44kB inactive_anon:888kB active_file:482644kB inactive_file:366988kB unevictable:26080kB isolated(anon):0kB isolated(file):0kB present:1047680kB managed:982144kB mlocked:26080kB dirty:0kB writeback:0kB mapped:4524kB shmem:4500kB slab_reclaimable:71140kB slab_unreclaimable:24332kB kernel_stack:24kB pagetables:96kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:27 all_unreclaimable? no
lowmem_reserve[]: 0 0 995 995
Node 1 Normal free:3328kB min:2024kB low:2528kB high:3036kB active_anon:8976kB inactive_anon:9184kB active_file:523768kB inactive_file:242484kB unevictable:3144kB isolated(anon):0kB isolated(file):0kB present:1048576kB managed:1018896kB mlocked:3144kB dirty:0kB writeback:0kB mapped:10316kB shmem:9976kB slab_reclaimable:100804kB slab_unreclaimable:115036kB kernel_stack:352kB pagetables:1924kB unstable:0kB bounce:0kB free_cma:0kB writeback_tmp:0kB pages_scanned:71 all_unreclaimable? no
lowmem_reserve[]: 0 0 0 0
Node 0 DMA: 2*4kB (U) 4*8kB (UEM) 4*16kB (UEM) 2*32kB (U) 3*64kB (UE) 1*128kB (E) 1*256kB (U) 2*512kB (EM) 2*1024kB (UE) 2*2048kB (ER) 0*4096kB = 7912kB
Node 0 DMA32: 1228*4kB (UEM) 25*8kB (UEM) 19*16kB (M) 17*32kB (M) 7*64kB (M) 1*128kB (M) 0*256kB 0*512kB 1*1024kB (R) 0*2048kB 0*4096kB = 7560kB
Node 1 DMA32: 1571*4kB (UEMR) 25*8kB (EMR) 9*16kB (MR) 5*32kB (MR) 2*64kB (M) 0*128kB 2*256kB (M) 1*512kB (M) 0*1024kB 0*2048kB 0*4096kB = 7940kB
Node 1 Normal: 537*4kB (UEMR) 46*8kB (UEMR) 19*16kB (MR) 8*32kB (MR) 0*64kB 0*128kB 1*256kB (R) 0*512kB 0*1024kB 0*2048kB 0*4096kB = 3332kB
854648 total pagecache pages
0 pages in swap cache
Swap cache stats: add 0, delete 0, find 0/0
Free swap  = 6160380kB
Total swap = 6160380kB
1048575 pages RAM
35415 pages reserved
884260 pages shared
916445 pages non-shared
SLAB: Unable to allocate memory on node 1 (gfp=0x0)
  cache: idr_layer_cache, object size: 2112, order: 1
  node 0: slabs: 91/91, objs: 273/273, free: 0
  node 1: slabs: 200/200, objs: 600/600, free: 0


> +	if (rv >= 0)
> +		lkb->lkb_id = rv;
>  	spin_unlock(&ls->ls_lkbidr_spin);
> -
> -	if (rv == -EAGAIN)
> -		goto retry;
> +	idr_preload_end();
>  
>  	if (rv < 0) {
>  		log_error(ls, "create_lkb idr error %d", rv);

  reply	other threads:[~2013-03-11 19:30 UTC|newest]

Thread overview: 134+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 19:39 [PATCHSET] idr: deprecate idr_remova_all() and add idr_alloc() Tejun Heo
2013-02-06 19:39 ` [PATCH 01/77] idr: fix a subtle bug in idr_get_next() Tejun Heo
2013-02-06 19:39 ` [PATCH 02/77] idr: make idr_destroy() imply idr_remove_all() Tejun Heo
2013-02-06 19:39 ` [PATCH 03/77] atm/nicstar: don't use idr_remove_all() Tejun Heo
2013-02-06 19:39 ` [PATCH 04/77] block/loop: " Tejun Heo
2013-02-06 19:39 ` [PATCH 05/77] firewire: " Tejun Heo
2013-02-06 19:39 ` [PATCH 06/77] drm: " Tejun Heo
2013-02-06 19:39   ` Tejun Heo
2013-02-06 19:39 ` [PATCH 07/77] dm: " Tejun Heo
2013-02-06 19:39 ` [PATCH 08/77] remoteproc: " Tejun Heo
2013-02-06 19:39 ` [PATCH 09/77] rpmsg: " Tejun Heo
2013-02-06 19:39 ` [PATCH 10/77] dlm: use idr_for_each_entry() in recover_idr_clear() error path Tejun Heo
2013-02-06 19:39   ` [Cluster-devel] " Tejun Heo
2013-02-06 19:39 ` [PATCH 11/77] dlm: don't use idr_remove_all() Tejun Heo
2013-02-06 19:39   ` [Cluster-devel] " Tejun Heo
2013-02-06 19:39 ` [PATCH 12/77] nfs: idr_destroy() no longer needs idr_remove_all() Tejun Heo
2013-02-06 19:39 ` [PATCH 13/77] inotify: don't use idr_remove_all() Tejun Heo
     [not found] ` <1360179649-22465-1-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-02-06 19:39   ` [PATCH 14/77] cgroup: " Tejun Heo
2013-02-06 19:39     ` Tejun Heo
     [not found]     ` <1360179649-22465-15-git-send-email-tj-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
2013-02-07  1:29       ` Li Zefan
2013-02-07  1:29     ` Li Zefan
2013-02-07  1:29       ` Li Zefan
2013-02-06 19:40   ` [PATCH 42/77] IB/ehca: convert to idr_alloc() Tejun Heo
2013-02-06 19:40     ` Tejun Heo
2013-02-06 19:40   ` [PATCH 71/77] cgroup: " Tejun Heo
2013-02-06 19:40     ` Tejun Heo
2013-02-06 19:39 ` [PATCH 15/77] idr: deprecate idr_remove_all() Tejun Heo
2013-02-06 19:39 ` [PATCH 16/77] idr: cosmetic updates to struct / initializer definitions Tejun Heo
2013-02-06 19:39 ` [PATCH 17/77] idr: relocate idr_for_each_entry() and reorganize id[r|a]_get_new() Tejun Heo
2013-02-06 19:39 ` [PATCH 18/77] idr: remove _idr_rc_to_errno() hack Tejun Heo
2013-02-06 19:39 ` [PATCH 19/77] idr: refactor idr_get_new_above() Tejun Heo
2013-02-06 19:39 ` [PATCH 20/77] idr: implement idr_preload[_end]() and idr_alloc() Tejun Heo
2013-02-07 19:53   ` [PATCH v3 " Tejun Heo
2013-02-06 19:39 ` [PATCH 21/77] block: fix synchronization and limit check in blk_alloc_devt() Tejun Heo
2013-02-06 22:24   ` Andrew Morton
2013-02-06 22:27     ` Tejun Heo
2013-02-06 22:32       ` Andrew Morton
2013-02-06 22:33         ` Tejun Heo
2013-02-06 19:39 ` [PATCH 22/77] block: convert to idr_alloc() Tejun Heo
2013-02-06 19:39 ` [PATCH 23/77] block/loop: " Tejun Heo
2013-02-07 18:25   ` [PATCH 22.5/77] block/loop: fix error return value in loop_add() Tejun Heo
2013-02-07 18:26   ` [PATCH v2 23/77] block/loop: convert to idr_alloc() Tejun Heo
2013-02-06 19:39 ` [PATCH 24/77] atm/nicstar: " Tejun Heo
2013-02-06 19:39 ` [PATCH 25/77] drbd: " Tejun Heo
2013-02-06 19:39 ` [PATCH 26/77] dca: " Tejun Heo
2013-02-06 19:39 ` [PATCH 27/77] dmaengine: " Tejun Heo
2013-02-06 19:40 ` [PATCH 28/77] firewire: add minor number range check to fw_device_init() Tejun Heo
2013-02-06 19:40 ` [PATCH 29/77] firewire: convert to idr_alloc() Tejun Heo
2013-02-06 19:40 ` [PATCH 30/77] gpio: " Tejun Heo
2013-02-06 19:40 ` [PATCH 31/77] drm: " Tejun Heo
2013-02-06 19:40   ` Tejun Heo
2013-02-06 19:40 ` [PATCH 32/77] drm/exynos: " Tejun Heo
2013-02-06 19:40 ` [PATCH 33/77] drm/i915: " Tejun Heo
2013-02-06 19:40 ` [PATCH 34/77] drm/sis: " Tejun Heo
2013-02-06 19:40   ` Tejun Heo
2013-02-06 19:40 ` [PATCH 35/77] drm/via: " Tejun Heo
2013-02-06 19:40   ` Tejun Heo
2013-02-06 19:40 ` [PATCH 36/77] drm/vmwgfx: " Tejun Heo
2013-02-06 19:40 ` [PATCH 37/77] i2c: " Tejun Heo
2013-02-06 19:40   ` Tejun Heo
2013-02-07 15:28   ` Mark Brown
2013-02-07 16:32     ` Tejun Heo
2013-02-07 16:32       ` Tejun Heo
2013-02-07 16:39       ` Mark Brown
2013-02-07 16:39         ` Mark Brown
2013-02-07 16:55         ` [PATCH v2] " Tejun Heo
2013-02-07 16:55           ` Tejun Heo
2013-02-07 18:52           ` Mark Brown
2013-02-08 12:10           ` Mark Brown
2013-02-08 12:10             ` Mark Brown
2013-02-10 11:47           ` Wolfram Sang
2013-02-10 11:47             ` Wolfram Sang
2013-02-12 17:34             ` [PATCH -mm] i2c: style cleanups after idr_alloc() conversion Tejun Heo
2013-02-12 17:34               ` Tejun Heo
2013-02-12 17:36               ` Tejun Heo
2013-02-12 17:36                 ` Tejun Heo
2013-02-12 18:00                 ` Jean Delvare
2013-02-12 18:00                   ` Jean Delvare
2013-02-13 20:42               ` Wolfram Sang
2013-02-13 20:42                 ` Wolfram Sang
2013-02-06 19:40 ` [PATCH 38/77] IB/core: convert to idr_alloc() Tejun Heo
2013-02-06 19:40 ` [PATCH 39/77] IB/amso1100: " Tejun Heo
2013-02-06 19:40 ` [PATCH 40/77] IB/cxgb3: " Tejun Heo
2013-02-06 19:40 ` [PATCH 41/77] IB/cxgb4: " Tejun Heo
2013-02-06 19:40 ` [PATCH 43/77] IB/ipath: " Tejun Heo
2013-02-06 19:40 ` [PATCH 44/77] IB/mlx4: " Tejun Heo
2013-02-06 19:40 ` [PATCH 45/77] IB/ocrdma: " Tejun Heo
2013-02-06 19:40 ` [PATCH 46/77] IB/qib: " Tejun Heo
2013-02-06 19:40 ` [PATCH 47/77] dm: " Tejun Heo
2013-02-06 19:40   ` Tejun Heo
2013-02-06 19:40 ` [PATCH 48/77] memstick: " Tejun Heo
2013-02-06 19:40 ` [PATCH 49/77] mfd: " Tejun Heo
2013-02-06 19:40 ` [PATCH 50/77] misc/c2port: " Tejun Heo
2013-02-06 19:40 ` [PATCH 51/77] misc/tifm_core: " Tejun Heo
2013-02-06 19:40 ` [PATCH 52/77] mmc: " Tejun Heo
2013-02-06 19:40 ` [PATCH 53/77] mtd: " Tejun Heo
2013-02-06 19:40   ` Tejun Heo
2013-02-06 19:40 ` [PATCH 54/77] macvtap: " Tejun Heo
2013-02-06 19:40 ` [PATCH 55/77] ppp: " Tejun Heo
2013-02-06 19:40   ` Tejun Heo
2013-02-06 19:40 ` [PATCH 56/77] power: " Tejun Heo
2013-02-06 19:40 ` [PATCH 57/77] pps: " Tejun Heo
2013-02-06 19:40 ` [PATCH 58/77] remoteproc: " Tejun Heo
2013-02-06 19:40 ` [PATCH 59/77] rpmsg: " Tejun Heo
2013-02-06 19:40 ` [PATCH 60/77] scsi/bfa: " Tejun Heo
2013-02-06 19:40 ` [PATCH 61/77] scsi: " Tejun Heo
2013-02-06 19:40 ` [PATCH 62/77] target/iscsi: " Tejun Heo
2013-02-06 19:40 ` [PATCH 63/77] scsi/lpfc: " Tejun Heo
2013-02-11 22:47   ` James Smart
2013-02-11 22:47     ` James Smart
2013-02-06 19:40 ` [PATCH 64/77] thermal: " Tejun Heo
2013-02-06 19:40 ` [PATCH 65/77] uio: " Tejun Heo
2013-02-06 19:40 ` [PATCH 66/77] vfio: " Tejun Heo
2013-02-06 19:40 ` [PATCH 67/77] dlm: " Tejun Heo
2013-03-11 19:29   ` David Teigland [this message]
2013-03-11 20:28     ` Tejun Heo
2013-03-12 15:17       ` David Teigland
2013-03-12 21:22         ` [PATCH] idr: idr_alloc() shouldn't trigger lowmem warning when preloaded Tejun Heo
2013-02-06 19:40 ` [PATCH 68/77] inotify: convert to idr_alloc() Tejun Heo
2013-02-06 19:40 ` [PATCH 69/77] ocfs2: " Tejun Heo
2013-02-06 19:40 ` [PATCH 70/77] ipc: " Tejun Heo
2013-02-07 19:43   ` [PATCH v2 " Tejun Heo
2013-02-06 19:40 ` [PATCH 72/77] events: " Tejun Heo
2013-02-06 19:40 ` [PATCH 73/77] posix-timers: " Tejun Heo
2013-02-06 19:40 ` [PATCH 74/77] net/9p: " Tejun Heo
2013-02-06 19:40 ` [PATCH 75/77] mac80211: " Tejun Heo
2013-02-06 19:40 ` [PATCH 76/77] sctp: " Tejun Heo
2013-02-06 19:40   ` Tejun Heo
2013-02-06 20:07   ` Vlad Yasevich
2013-02-06 20:07     ` Vlad Yasevich
2013-02-07 14:49   ` Neil Horman
2013-02-07 14:49     ` Neil Horman
2013-02-06 19:40 ` [PATCH 77/77] nfs4client: " Tejun Heo
2013-02-08  4:04 ` [PATCHSET] idr: deprecate idr_remova_all() and add idr_alloc() Dave Airlie

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=20130311192955.GA23892@redhat.com \
    --to=teigland@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.