Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933857AbbDQNiy (ORCPT ); Fri, 17 Apr 2015 09:38:54 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34272 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933818AbbDQNip (ORCPT ); Fri, 17 Apr 2015 09:38:45 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Christie , Mel Gorman , Sage Weil , Ilya Dryomov Subject: [PATCH 3.19 083/101] Revert "libceph: use memalloc flags for net IO" Date: Fri, 17 Apr 2015 15:29:11 +0200 Message-Id: <20150417132517.961234597@linuxfoundation.org> X-Mailer: git-send-email 2.3.5 In-Reply-To: <20150417132514.379828774@linuxfoundation.org> References: <20150417132514.379828774@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3040 Lines: 94 3.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Ilya Dryomov commit 6d7fdb0ab351b33d4c12d53fe44be030b90fc9d4 upstream. This reverts commit 89baaa570ab0b476db09408d209578cfed700e9f. Dirty page throttling should be sufficient for us in the general case so there is no need to use __GFP_MEMALLOC - it would be needed only in the swap-over-rbd case, which we currently don't support. (It would probably take approximately the commit that is being reverted to add that support, but we would also need the "swap" option to distinguish from the general case and make sure swap ceph_client-s aren't shared with anything else.) See ceph-devel threads [1] and [2] for the details of why enabling pfmemalloc reserves for all cases is a bad thing. On top of potential system lockups related to drained emergency reserves, this turned out to cause ceph lockups in case peers are on the same host and communicating via loopback due to sk_filter() dropping pfmemalloc skbs on the receiving side because the receiving loopback socket is not tagged with SOCK_MEMALLOC. [1] "SOCK_MEMALLOC vs loopback" http://www.spinics.net/lists/ceph-devel/msg22998.html [2] "[PATCH] libceph: don't set memalloc flags in loopback case" http://www.spinics.net/lists/ceph-devel/msg23392.html Conflicts: net/ceph/messenger.c [ context: tcp_nodelay option ] Cc: Mike Christie Cc: Mel Gorman Cc: Sage Weil Signed-off-by: Ilya Dryomov Acked-by: Mike Christie Acked-by: Mel Gorman Signed-off-by: Greg Kroah-Hartman --- net/ceph/messenger.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -484,7 +484,7 @@ static int ceph_tcp_connect(struct ceph_ IPPROTO_TCP, &sock); if (ret) return ret; - sock->sk->sk_allocation = GFP_NOFS | __GFP_MEMALLOC; + sock->sk->sk_allocation = GFP_NOFS; #ifdef CONFIG_LOCKDEP lockdep_set_class(&sock->sk->sk_lock, &socket_class); @@ -510,8 +510,6 @@ static int ceph_tcp_connect(struct ceph_ return ret; } - sk_set_memalloc(sock->sk); - con->sock = sock; return 0; } @@ -2798,11 +2796,8 @@ static void con_work(struct work_struct { struct ceph_connection *con = container_of(work, struct ceph_connection, work.work); - unsigned long pflags = current->flags; bool fault; - current->flags |= PF_MEMALLOC; - mutex_lock(&con->mutex); while (true) { int ret; @@ -2856,8 +2851,6 @@ static void con_work(struct work_struct con_fault_finish(con); con->ops->put(con); - - tsk_restore_flags(current, pflags, PF_MEMALLOC); } /* -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/