Switch KM_SLEEP to KM_PUSHPAGE
authorBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 3 Sep 2012 20:05:19 +0000 (13:05 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 4 Sep 2012 15:41:12 +0000 (08:41 -0700)
This warning indicates the incorrect use of KM_SLEEP in a call
path which must use KM_PUSHPAGE to avoid deadlocking in direct
reclaim.  See commit b8d06fca089fae4680c3a552fc55c512bfb02202
for additional details.

  SPL: Fixing allocation for task txg_sync (6093) which
  used GFP flags 0x297bda7c with PF_NOFS set

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #917

module/zfs/arc.c

index e75a3f5..55f1909 100644 (file)
@@ -1420,7 +1420,7 @@ arc_buf_data_free(arc_buf_hdr_t *hdr, void (*free_func)(void *, size_t),
 {
        if (HDR_L2_WRITING(hdr)) {
                l2arc_data_free_t *df;
-               df = kmem_alloc(sizeof (l2arc_data_free_t), KM_SLEEP);
+               df = kmem_alloc(sizeof (l2arc_data_free_t), KM_PUSHPAGE);
                df->l2df_data = data;
                df->l2df_size = size;
                df->l2df_func = free_func;