From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 8D0E31C5486; Fri, 31 Jan 2025 13:38:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.12 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738330741; cv=none; b=iu6YM4hdZQJS1S3xAaPYCXSerBs1udFZSOsI7eu8ZESkf9p6+LZhJD+2MVlCUbjG9Ie9q89e/HACYSQDbYFS/1zV6Eye70d7zlhGaGj1Wnfm4ZFxzRapPD7TknpS4hphVoF296CZMCUgBF5hrTL5V6a+hruej231tJJwqKVqojk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738330741; c=relaxed/simple; bh=BlkMwqZELP0Gp0TzhdEuSlXKujbDb3xlMAHFMVLsdm8=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sIuzqmnE9B7rOhOUJXINW3BUucwGQSxivQtRLqMjRLVtjaseagvduF4gXkjU45iYYDnRPkq2G6qmCOIxCpNgK0Cmut83vjFmvgAdZ2GggfSt5qU5LCJAgue2ypPRUtB5Q8tbIaLPLfG2hTf4bat/q4Z49mIRUYZYJ+q53XFAEBU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=Y1GSRVG0; arc=none smtp.client-ip=198.175.65.12 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Y1GSRVG0" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738330740; x=1769866740; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=BlkMwqZELP0Gp0TzhdEuSlXKujbDb3xlMAHFMVLsdm8=; b=Y1GSRVG0zPo2JYRw28LW1xP51qGwo4Sbm320todu55TO7kzYrQZ0b6a+ fo43MghPlQn6Fcy9BVFCMdjbNNlKDc0CuMr4tNepzrK7JENEZAp/CSDRj 8FRuTrjfdO4ak5T19dvT1sfzJguqzf5JmCzzqu8r4g94v8HoTRxQpWYBb 1V4huAvOJw3t7xFpDee8qOrUsoax+GRamr74+LSkFR153LNAfTQYQ+1yi O74W9bnSP4HsbT7+H0g0cDO0RXr2B5XoLIW8/lbtmedFGnHdtoGU2PKgA Sn5dtzBLUd95x7cUhuB9Hilp5bmfYuEAek5ErjKU3tuu7jRZAxptpDLaQ w==; X-CSE-ConnectionGUID: 5u7Q1ErMS0CQ3xhla2sdGg== X-CSE-MsgGUID: dhnNj2pVR9up7opMIcfcRQ== X-IronPort-AV: E=McAfee;i="6700,10204,11332"; a="50283182" X-IronPort-AV: E=Sophos;i="6.13,248,1732608000"; d="scan'208";a="50283182" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by orvoesa104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2025 05:38:58 -0800 X-CSE-ConnectionGUID: yJ4rsx1GRSusxX/Vynh0XQ== X-CSE-MsgGUID: gJj2D0AhTKuPuWC4WLeG5A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="146816937" Received: from dprybysh-mobl.ger.corp.intel.com (HELO intel.com) ([10.245.246.175]) by smtpauth.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 31 Jan 2025 05:38:46 -0800 Date: Fri, 31 Jan 2025 14:38:42 +0100 From: Andi Shyti To: "Kirill A. Shutemov" Cc: Andrew Morton , "Matthew Wilcox (Oracle)" , Jens Axboe , "Jason A. Donenfeld" , Andi Shyti , Chengming Zhou , Christian Brauner , Christophe Leroy , Dan Carpenter , David Airlie , David Hildenbrand , Hao Ge , Jani Nikula , Johannes Weiner , Joonas Lahtinen , Josef Bacik , Masami Hiramatsu , Mathieu Desnoyers , Miklos Szeredi , Nhat Pham , Oscar Salvador , Ran Xiaokai , Rodrigo Vivi , Simona Vetter , Steven Rostedt , Tvrtko Ursulin , Vlastimil Babka , Yosry Ahmed , Yu Zhao , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-trace-kernel@vger.kernel.org Subject: Re: [PATCHv3 03/11] drm/i915/gem: Use PG_dropbehind instead of PG_reclaim Message-ID: References: <20250130100050.1868208-1-kirill.shutemov@linux.intel.com> <20250130100050.1868208-4-kirill.shutemov@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250130100050.1868208-4-kirill.shutemov@linux.intel.com> Hi Kirill, On Thu, Jan 30, 2025 at 12:00:41PM +0200, Kirill A. Shutemov wrote: > The recently introduced PG_dropbehind allows for freeing folios > immediately after writeback. Unlike PG_reclaim, it does not need vmscan > to be involved to get the folio freed. > > Instead of using folio_set_reclaim(), use folio_set_dropbehind() in > __shmem_writeback() > > It is safe to leave PG_dropbehind on the folio if, for some reason > (bug?), the folio is not in a writeback state after ->writepage(). > In these cases, the kernel had to clear PG_reclaim as it shared a page > flag bit with PG_readahead. > > Signed-off-by: Kirill A. Shutemov > Acked-by: David Hildenbrand Reviewed-by: Andi Shyti Thanks, Andi