Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753007AbdF2RYA (ORCPT ); Thu, 29 Jun 2017 13:24:00 -0400 Received: from imap0.codethink.co.uk ([185.43.218.159]:38457 "EHLO imap0.codethink.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751690AbdF2RXx (ORCPT ); Thu, 29 Jun 2017 13:23:53 -0400 Message-ID: <1498757023.1935.57.camel@codethink.co.uk> Subject: Re: [PATCH 4.4 24/30] swap: cond_resched in swap_cgroup_prepare() From: Ben Hutchings To: Greg Kroah-Hartman , Yu Zhao , David Rientjes Cc: linux-kernel@vger.kernel.org, stable@vger.kernel.org, Michal Hocko , Vladimir Davydov , Andrew Morton , Linus Torvalds Date: Thu, 29 Jun 2017 18:23:43 +0100 In-Reply-To: <20170619152034.567871881@linuxfoundation.org> References: <20170619152033.211450261@linuxfoundation.org> <20170619152034.567871881@linuxfoundation.org> Organization: Codethink Ltd. Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.9-1+b1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 878 Lines: 31 On Mon, 2017-06-19 at 23:20 +0800, Greg Kroah-Hartman wrote: > 4.4-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Yu Zhao > > commit ef70762948dde012146926720b70e79736336764 upstream. > > I saw need_resched() warnings when swapping on large swapfile (TBs) > because continuously allocating many pages in swap_cgroup_prepare() took > too long. > > We already cond_resched when freeing page in swap_cgroup_swapoff(). Do > the same for the page allocation. [...] That seems to imply that this should also go into stable branches: commit 460bcec84e11c75122ace5976214abbc596eb91b Author: David Rientjes Date: Fri Apr 7 16:05:00 2017 -0700 mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff() Ben. -- Ben Hutchings Software Developer, Codethink Ltd.