Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp4241868pxb; Tue, 25 Jan 2022 06:31:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJy0xsxoTnf113Jr9bfUchW7CKNsRXfSHs6KjoGX6fNrSFrvzHdXJVV81u3b2EFgS9S3kA+a X-Received: by 2002:a17:90a:d144:: with SMTP id t4mr3785583pjw.18.1643121086056; Tue, 25 Jan 2022 06:31:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643121086; cv=none; d=google.com; s=arc-20160816; b=Jt79abtMkZ9z+LU8pgFD0VVS74ni1jSzqnicm4WZf+PyP5+CxoTUt2G7sGgewIdYzo gRrNbRTWz1GdG2kv6nusOd8GOqUJNeE6SAfpMlroaeXVKUmhSBGIL5LEqkYOAn9OLwgY L8l6fhTyS7P5D+a6SNDgo84zw3tDD7RskQ2TBZ9l0KP7KpR9bfQKNvRE/JqlwOl+aB+I 0hAFdeknvEHEYVmACAj0UgwchuFzJbWdGfgsSySr4bKQRDo9PTzZM/sYpG9TNL9p246U +w1fzKcbL1TSYDR+mWrVOzNF04MuZ/ohQqPENcHKpOKff5Px/+QVxOjop1unwTXtEY// haiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:reply-to :date:subject:cc:to:from:user-agent:references:dkim-signature :dkim-signature; bh=wjLef+eHR65gSrHBUwJYgL8VczDBRD6PtowiaRp8cqg=; b=dM/VrVcm7XXdfG34H92/CuhyC4e1SRqDxYxnDnpeaMbIZwfpaa0ysc5whGxCMxYflT vcrKtfI05mgbtfFezwZLPG6GTlHuDKGg/bwaMRUEifb+MaPka28xl1YDMOoNkSBz21OQ R0gsaE8xeXICeg/5xxqVIzsRkuMcyFerUW48Reoatln4rfj9JF0bBe8UgAB3Rrfl9z4/ PLoM2HhzImWd+P9itoP0W+10PNO7jpAoWiSNFUrf637ZxXraXSEydyDX+KtGY9t99JKV HjSXBRUYlc2ytgCTGpr1XOJfwP2IEifrmzvQD+mrot221JfoOG/vP/Q11dAppxFbw5+O MXng== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=V2hf9WhY; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x37si16170303pgl.334.2022.01.25.06.31.12; Tue, 25 Jan 2022 06:31:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=V2hf9WhY; dkim=neutral (no key) header.i=@suse.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234334AbiAYJrD (ORCPT + 99 others); Tue, 25 Jan 2022 04:47:03 -0500 Received: from smtp-out2.suse.de ([195.135.220.29]:39002 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232545AbiAYJks (ORCPT ); Tue, 25 Jan 2022 04:40:48 -0500 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id C1C881F381; Tue, 25 Jan 2022 09:40:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1643103635; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wjLef+eHR65gSrHBUwJYgL8VczDBRD6PtowiaRp8cqg=; b=V2hf9WhYVmPenYoQzKChrh0nsB0PQioiYNLQUrnwuWOtckSlBXL/PG4a22f0pShotdLkMh 6aLik9Bz/6cHPeoQFJzf1mU/8y7d+p/ux+CbSjg74DX0nb1yi1DMNGvVCyW0N43Kn5tSZG Iw/b4UsRZwLkVzGUrno2xRJY8SXw8k8= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1643103635; h=from:from:reply-to:reply-to:date:date:message-id:message-id:to:to: cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=wjLef+eHR65gSrHBUwJYgL8VczDBRD6PtowiaRp8cqg=; b=8GlYzYvBEcCCBr+9cTRi9mfPfMAd6QoqhINOtop7egkKKZxKCbFV7bo/SCV5bEPS6bhU8P 9R0/O75lzTPU2+Cg== Received: from g78 (unknown [10.163.24.90]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 00244A3B84; Tue, 25 Jan 2022 09:40:34 +0000 (UTC) References: <20210912123429.GA25450@xsang-OptiPlex-9020> <20210917121331.GA14905@quack2.suse.cz> User-agent: mu4e 1.6.10; emacs 27.2 From: Richard Palethorpe To: Jan Kara Cc: Cyril Hrubis , Miklos Szeredi , lkp@intel.com, Chi Wu , LKML , Jens Axboe , lkp@lists.01.org, kernel test robot , Sedat Dilek , Tejun Heo , Andrew Morton , Linus Torvalds , ltp@lists.linux.it Subject: Re: [LTP] [mm/page] ab19939a6a: ltp.msync04.fail Date: Tue, 25 Jan 2022 09:27:30 +0000 Reply-To: rpalethorpe@suse.de In-reply-to: <20210917121331.GA14905@quack2.suse.cz> Message-ID: <87o840xiel.fsf@suse.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Jan Kara writes: > On Mon 13-09-21 10:11:22, Cyril Hrubis wrote: >> Hi! >> > FYI, we noticed the following commit (built with gcc-9): >> > >> > commit: ab19939a6a5010cba4e9cb04dd8bee03c72edcbd ("mm/page-writeback: Fix performance when BDI's share of ratio is 0.") >> > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master >> > >> > >> > in testcase: ltp >> > version: ltp-x86_64-14c1f76-1_20210907 >> > with following parameters: >> > >> > disk: 1HDD >> > fs: xfs >> > test: syscalls-03 >> > ucode: 0xe2 >> > >> > test-description: The LTP testsuite contains a collection of tools for testing the Linux kernel and related features. >> > test-url: http://linux-test-project.github.io/ >> >> The msync04 test formats a device with a diffrent filesystems, for each >> filesystem it maps a file, writes to the mapped page and the checks a >> dirty bit in /proc/kpageflags before and after msync() on that page. >> >> This seems to be broken after this patch for ntfs over FUSE and it looks >> like the page does not have a dirty bit set right after it has been >> written to. >> >> Also I guess that we should increase the number of the pages we dirty or >> attempt to retry since a single page may be flushed to the storage if we >> are unlucky and the process is preempted between the write and the >> initial check for the dirty bit. > > Yes, I agree. The most likely explanation I see for this is that the > identified commit results in waking flush worker earlier so it may now > succeed in cleaning the page before get_dirty_bit() in the LTP testcase > manages to see it. This is a principial race in this testcase, you can > perhaps make it less likely but not completely fix it AFAICT. > > Honza > -- > Jan Kara > SUSE Labs, CR If the dirty bit is not set, then I guess dropping the pagecache will not write anything to the underlying storage? So when we see no dirty bit is set, we can drop the pagecache then read the file to check the value was written correctly? If so then we can exit with TCONF saying msync couldn't be tested because the storage was written to too quickly. Also I guess we can optimize the get_dirty_bit function. It's doing 3 syscalls instead of 1 AFAICT. -- Thank you, Richard.