Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp295094rdb; Mon, 22 Jan 2024 22:43:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IHCle6sHtWRITMY25j1IMCRlFLnje1Ekz5/re2h3ciMlkVuI16IEZNZ4kB4JC52turgX1Pa X-Received: by 2002:a17:90b:1196:b0:28f:fd4b:64aa with SMTP id gk22-20020a17090b119600b0028ffd4b64aamr2066973pjb.44.1705992203335; Mon, 22 Jan 2024 22:43:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705992203; cv=pass; d=google.com; s=arc-20160816; b=ycHcq1cIqy/sSDwhlabv0XJYF8pdWCX3Uvs1n1zSZnKhTunWKbDVVCnGQz/kdQUvKw 7iVh6PsaxzFFlgb7CmzAdsJGwiE7FprYYKWG7bvH01nlzDc9RhUq5R8b4D3rhHQKkad2 UkXzGzRIODP31HGV3YeT+btvyO/xRQ55fA/YwEQvn6w8e9TEujlY755lQCA/Ogi6QGg0 anbl+oGQyooStf64WFXEbANuabu9nYQ0QUKiZV3bVOMvmN2uh7tSsOoX2v5zF/kwpYjI WEmfalX9G6Imxz3wAm0k29n+PEXJn1swD6mkla8BQI6NBU9E123SMdQgupdGsiKflMY5 nB2w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=2FZwZ+rXghzrwMAzRL81BGjWf4dIgKukf4yDKbJi/Es=; fh=p24i0iRR5ibMkR2jW5+y7kJ3I4lmbGz2TEM8QiFmGDs=; b=eyaqLN5KYYolF0NGPZKPNuDm+cUVjmU5qASFTYVIdzfBbgbWwcEPhH9RZTRgaI1PPr BbMPDgoTXSSzjuRfyaB8i+CYkH5m/G3ykBHf7NG7fp2APuyjLxTusDubeho//kNbsjyZ HyDRdCgmV4yZXZ6qdlUqQXKKQ1VGDdHOc9sg6KYPXO66d73enU6k+mn9MUmmwHcvxfxh YhtkuCYtpdNgTyR3wOJ0bh7o12Ho0nsqFFmRTTwG/8H8W6BTIL/+hj3gisyOs170UP5F oljkw40pDrorjGSJuHvx+ASUYjvznH86U4PZC69bUABlFay9iJOj3pLLPMTu1idnyHJj yDRA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=LUY9Yx2c; arc=pass (i=1 spf=pass spfdomain=flex--surenb.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-34800-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id o16-20020a17090ad25000b00290cfa8871fsi693098pjw.122.2024.01.22.22.43.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 22:43:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34800-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=LUY9Yx2c; arc=pass (i=1 spf=pass spfdomain=flex--surenb.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-34800-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34800-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 6ADF9B20CBA for ; Tue, 23 Jan 2024 06:43:20 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B3D950276; Tue, 23 Jan 2024 06:43:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="LUY9Yx2c" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B5BF50261 for ; Tue, 23 Jan 2024 06:43:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705992191; cv=none; b=jW4sURMYHpjBJQUs9nb4ZeJbeCAROWsCemIeNdTsuCIvpfT2Amup4c0h+01GQW0SCz/r+xHv6OZ1oIMgSwrEIFvFtEQ3XUdKAEVnh5iBJUEqmuceSM6gVtAT5a+tFw8l2wC9YhwwFjsAzW+1YtA9HKEzpebLWV61soqUxhdYtsM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705992191; c=relaxed/simple; bh=Q0R2FUM/vqe/upMMhRgpiOo7u30kkYDKFKTZ4CE94Rg=; h=Date:Mime-Version:Message-ID:Subject:From:To:Cc:Content-Type; b=kht63L4XVOdbqnLBv4ag4wWAmuBA5/Qb8Zu0ElaXRY1m+NJ0ClEOqpO22uc8TQZp4JD2yiYheGq6QIicTsJFs6fuR0fY5kopXouwsvatT1RUx+05LvLkjKWZVk5zldm7sBxxLGE6zqcoVTWSmm1EV5gH7Ij8ZHxZrcTi939R0WA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--surenb.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=LUY9Yx2c; arc=none smtp.client-ip=209.85.128.202 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--surenb.bounces.google.com Received: by mail-yw1-f202.google.com with SMTP id 00721157ae682-600273598c1so17285677b3.3 for ; Mon, 22 Jan 2024 22:43:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705992189; x=1706596989; darn=vger.kernel.org; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=2FZwZ+rXghzrwMAzRL81BGjWf4dIgKukf4yDKbJi/Es=; b=LUY9Yx2cU7QNPGdyE6OduYogspnbpDHjpIAybc/LO/XQSkEoiJ1GXc/0j9JvMNEhrO 4c1FUl+ODp0RQ3fn4fqRERPQM4cmiANEtIT5YQ0o5xtkGdJfyUAtbPDAuPh9B8uZrEYk DdrCFAkRr8E3S9ntipLYAFOrzEYvwUHMofdRNzzE7bWiZEz6I4yEvoc3eyDCLHybOE+p rRonjN2rmC3+YWCxZEZHnvfGUokluPNUxUnQF7Sp1cbdEFMmUODajpQ88AIGy45v11IV BTE58cbDg5Rm+fFADuJpGP8Hz9b+uf4u3tONUFhg//o1Wy7x88eRwELQwBt0iiqGSx2g XH2w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705992189; x=1706596989; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=2FZwZ+rXghzrwMAzRL81BGjWf4dIgKukf4yDKbJi/Es=; b=SJYqIrkPTj91/80oPz2RC7NDJkOawO9IMbst8biCrnrM1JG25HRV3AQBAT2aA7BES+ BVjW1PgdWxf1+vgPLxBbUqlW3PaToWAKuAuShRTu413Bk7RQf0wlXe3WBWiytkX1bmB0 vgEoqbWgc3M2rO+hLI34+g07XGXvdQaOgNwaDP0qCc/rwSuVveU+XUDYFpbcK+jzMAV7 g6wNoq79TllRSdnZ/e9vY+YQ2HOymaxpBwBm+5nY9iQ36iobgeDpGhU7mBOzUYWhVvEn CkxHPRHggf9CmU1wgksohTbq2jpOhcLgqvBoeUQSXH9wnzDbfJZpzS93ZLqY5tj0Ax2W 5b9Q== X-Gm-Message-State: AOJu0YwZGgkb2EiP6bhdZlGYXJX++q2LBPRGMDOImNvFYGXge1RPXz7z 1omeiWmt/5Q8mXreduDeQ3OpTU68JizbwP0/+YuTgrB6It4eKkrO+hMWGbNoSNudbbZ+e66h+EV Akw== X-Received: from surenb-desktop.mtv.corp.google.com ([2620:15c:211:201:6bca:2511:6f80:6efe]) (user=surenb job=sendgmr) by 2002:a0d:d68f:0:b0:5f9:990d:78c0 with SMTP id y137-20020a0dd68f000000b005f9990d78c0mr2517316ywd.4.1705992189291; Mon, 22 Jan 2024 22:43:09 -0800 (PST) Date: Mon, 22 Jan 2024 22:43:05 -0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.429.g432eaa2c6b-goog Message-ID: <20240123064305.2829244-1-surenb@google.com> Subject: [PATCH 1/1] arch/arm/mm: fix major fault accounting when retrying under per-VMA lock From: Suren Baghdasaryan To: akpm@linux-foundation.org Cc: willy@infradead.org, will@kernel.org, catalin.marinas@arm.com, palmer@dabbelt.com, mpe@ellerman.id.au, christophe.leroy@csgroup.eu, agordeev@linux.ibm.com, gerald.schaefer@linux.ibm.com, dave.hansen@linux.intel.com, luto@kernel.org, peterz@infradead.org, surenb@google.com, x86@kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Russell King Content-Type: text/plain; charset="UTF-8" The change [1] missed ARM architecture when fixing major fault accounting for page fault retry under per-VMA lock. Add missing code to fix ARM architecture fault accounting. [1] 46e714c729c8 ("arch/mm/fault: fix major fault accounting when retrying under per-VMA lock") Fixes: 12214eba1992 ("mm: handle read faults under the VMA lock") Reported-by: Russell King (Oracle) Signed-off-by: Suren Baghdasaryan --- arch/arm/mm/fault.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/mm/fault.c b/arch/arm/mm/fault.c index e96fb40b9cc3..07565b593ed6 100644 --- a/arch/arm/mm/fault.c +++ b/arch/arm/mm/fault.c @@ -298,6 +298,8 @@ do_page_fault(unsigned long addr, unsigned int fsr, struct pt_regs *regs) goto done; } count_vm_vma_lock_event(VMA_LOCK_RETRY); + if (fault & VM_FAULT_MAJOR) + flags |= FAULT_FLAG_TRIED; /* Quick path to respond to signals */ if (fault_signal_pending(fault, regs)) { -- 2.43.0.429.g432eaa2c6b-goog