From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-f194.google.com ([209.85.215.194]:38192 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726829AbeHCHRp (ORCPT ); Fri, 3 Aug 2018 03:17:45 -0400 Date: Fri, 3 Aug 2018 14:23:06 +0900 From: Sergey Senozhatsky To: Minchan Kim Cc: Sergey Senozhatsky , Andrew Morton , LKML , Tino Lehnig , stable@vger.kernel.org, Jens Axboe Subject: Re: [PATCH 1/2] zram: remove BD_CAP_SYNCHRONOUS_IO with writeback feature Message-ID: <20180803052306.GC502@jagdpanzerIV> References: <20180802051112.86174-1-minchan@kernel.org> <20180802141304.d0589ddc5f8213429ab3b565@linux-foundation.org> <20180803023929.GA7500@jagdpanzerIV> <20180803030019.GB86818@rodete-desktop-imager.corp.google.com> <20180803041302.GB502@jagdpanzerIV> <20180803045121.GC86818@rodete-desktop-imager.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180803045121.GC86818@rodete-desktop-imager.corp.google.com> Sender: stable-owner@vger.kernel.org List-ID: On (08/03/18 13:51), Minchan Kim wrote: > > AFAIK, onging writeback page couldn't freed so it was not writeabck problem. > > What I'm tryig to fix is read part. > If we use swapcache, it shouldn't be a problem either because swapcache > has a reference count and we should wait PG_lock release before the freeing > from the swapcache so there is no race condition. Hmm, any chance a WB device can be async on its own? We add a page to a new bio and submit it to another async device driver. Then we return back to the upper layer (swap), which can free a page before the device picks up a request. Can this happen? [..] > However, I decided, at this moment, going this simple way for > stable-material to solve #0 and #1 problems at the same time. Agreed. Thanks. -ss