From patchwork Tue Apr 23 19:28:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeff Xu X-Patchwork-Id: 13640590 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DEE94C4345F for ; Tue, 23 Apr 2024 19:28:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B3866B017A; Tue, 23 Apr 2024 15:28:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 563496B017B; Tue, 23 Apr 2024 15:28:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3DFFF6B017C; Tue, 23 Apr 2024 15:28:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1C5826B017A for ; Tue, 23 Apr 2024 15:28:35 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 9AAB8A1C04 for ; Tue, 23 Apr 2024 19:28:34 +0000 (UTC) X-FDA: 82041783348.12.74F52FE Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) by imf09.hostedemail.com (Postfix) with ESMTP id CD9F414001C for ; Tue, 23 Apr 2024 19:28:31 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=do0coDHq; spf=pass (imf09.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.214.181 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1713900511; a=rsa-sha256; cv=none; b=KKDMhZi+My1qXot+s+AI1KGvnTR7uriNqN+w6tOBWsEJTIAcUineLtukvXesQDpE2I6L96 CfmOPqUbPqAc0mSeUyXIlnZA5Cb0QNDIqhrs+j7Sap4CNT1UuvlE43Ld7SoxTQ3+cuQdf4 HjeW/wYVjeBstmkUr9r8Fw72JSDUPyM= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=do0coDHq; spf=pass (imf09.hostedemail.com: domain of jeffxu@chromium.org designates 209.85.214.181 as permitted sender) smtp.mailfrom=jeffxu@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1713900511; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=INEaC4vRYJbuCJSHXmVmjM1IzdorHSDwN4KG1bY/7BU=; b=abjd3OebJ7urqyQ18aM2ZgvqgDbQPfg+6EJDAw8fUPBzssJ9ZQjPXithyOtQYJf89oQE3T H31fuxAR1MIYZIsbiifvvBXzp0kJsaNxntdKGZxtY2ilZs/pPl2Ttro/VfPj51yaP9qhIy UwQky7igoTWFjrQ6kkS+m8itNYqwIPc= Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-1e3f6f03594so45537545ad.0 for ; Tue, 23 Apr 2024 12:28:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1713900510; x=1714505310; darn=kvack.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=INEaC4vRYJbuCJSHXmVmjM1IzdorHSDwN4KG1bY/7BU=; b=do0coDHqGp7giqtJqGcChRw4yfkcC9MhuuoCL2rvLutCCAu1/C3ct5HGury6XFhyrp rluYqLHuxkAowzAFt3SbLeD5VooessE+h/b7ZyKw2TiwhwrYW2dBF9lQoVKPElhSSvvk DUbGlwsZdrGOL6Rwk/UiOHRiavJdbtLSj0+jM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713900510; x=1714505310; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=INEaC4vRYJbuCJSHXmVmjM1IzdorHSDwN4KG1bY/7BU=; b=jeUocsiM/ifVckJc2SQEN2GZQHnTDHnQ5G/tttN+MV91SxPowbiaRv26IynBp+pC3a 5UxMtZEi7dwa0FbKuK/+xZChl4OTzBSIdgRGdhKTKlT7xYBalNvZN/6U3PL5rm6gtDGl xCbh/Ig6LtWDQSmg0OROiNj2Efn8OsR3+5WUSefDV8Ka/qROTZlnhZaLUkSzUoVpgL+K jHMXWPAH5zyARyYWW1Mhml6sntfYykIw6x+2Rmxy3jbuIUqQSst60nEoeuCatvIh+8VI LtMs9RyDbR+zoCydwHQJq1xboUmwFHcWdwCDtN7LT/0DPE868C+2im3hqzGrb6ZTnEE/ B9Tg== X-Forwarded-Encrypted: i=1; AJvYcCWPpTOTO21aPZOK7i+ucidFth6Bl918lvBFVoqoAll8XEoyrozhOG8UcOSGh+I3R/rAbH9JG6AxAEeIEN3cZ4TkR88= X-Gm-Message-State: AOJu0YyGyQ/YoIdrIVzCD+aOkGgUuTM0gv3eAOEOj5rGxVsGMgg6XV4g JM7CLJKyLQELxXUwG5YFSbF3h7wzlvV1SnOz8sAqv+/zgE0RDpCrFfPpfD3G9g== X-Google-Smtp-Source: AGHT+IEkE3aR6EiB4AJEjVJJ8sF6fQHY6EOemKKBgKAsbSrWePAwJS1gaw+g+V8bS3l1Sz65QGVH+A== X-Received: by 2002:a17:902:bb83:b0:1e6:34f9:f766 with SMTP id m3-20020a170902bb8300b001e634f9f766mr451932pls.57.1713900510547; Tue, 23 Apr 2024 12:28:30 -0700 (PDT) Received: from localhost (238.76.127.34.bc.googleusercontent.com. [34.127.76.238]) by smtp.gmail.com with UTF8SMTPSA id bf6-20020a170902b90600b001e86e5dcb81sm10357738plb.283.2024.04.23.12.28.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 23 Apr 2024 12:28:30 -0700 (PDT) From: jeffxu@chromium.org To: akpm@linux-foundation.org, pedro.falcato@gmail.com Cc: jeffxu@google.com, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, Jeff Xu Subject: [PATCH v1 0/1] branch prediction hint Date: Tue, 23 Apr 2024 19:28:24 +0000 Message-ID: <20240423192825.1273679-1-jeffxu@chromium.org> X-Mailer: git-send-email 2.44.0.769.g3c40516874-goog MIME-Version: 1.0 X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: CD9F414001C X-Stat-Signature: onrn5ipd6fbmyob4mg3d95fhrqieaw4p X-Rspam-User: X-HE-Tag: 1713900511-172037 X-HE-Meta: U2FsdGVkX1+jJsR6Oz1zmcFQvzeF5zZRkZZyI1qZeEaqZe5UPmiHu0DJUUiqmq4AnRYbN74oLtK4dyQiNrWiejYchc6/vtdcesd2XF6WP70Un0byOv3oCovfLat1bMjpCZP8HznWSXykR7LcQ6mt/1zCNd7lwewriNZ5LtV+wGkZyi9FwJ4OizcMPrUG2MBA7CN1yb2UdUK5HavXh9QTz36ZPpKxRS/hYCiOMs8VDEwxJqKYstUSrDarsWhqJT5zz1dYg1GaM8qvWsb085SqOSMFvrhQ7MAVn1alPmT8AQbudAEl+ThFk5NxKtCpsG4mNIGTWbvMcKwzfw0BF3X1YhduzYtCySpOHVP/GMa6UYk9FdPsbwj67I86UF9iTGFZAT3N1ZlvT5tpmYEMxciHrKudkhbE8dyz2tnFWFyZL6RhOtR79pNWfL3xpPIL0KJsUEFmW0Sat1v4Q+5QldgftkxVL6Z8Z0oaEx9G4CIuUjYAb2NNOln1Abn7GkRxxrcJv3iKi6N/jKKGYeg+xaGiGKh31Sd/PrJq286Z8cgudWTQd6oberm8f2a5nrYkdllvqEQZuW5fp2oSf/c/3fN/kvIkpgz95zTheKDqBCT3G5+BDYb7euMaSCh15zlkwv1z0PHKNvCOcNLSm11betgoaCAmUsOzXlIqstIJOeElTYdZ33SIBeUm0knwnppIOZ2h5QK4j8/39gHwQCELgdbfgm2KPePA5F9Mzl45x2AxFNO/YL1xm2jijKI1kx2sTeKmwUFFm/nXb49qBNmFvlaNth3GSVtPO3/LKpHQMb2IDvgxnnINggOFkvF8yv530+Suyx4iMylV/gm4SrWWzGg3QapXTEWcEQw7gASZ3KRIYOD0KaPZu6JZ+VUTD/TCLz61CQBZo38nys/yxWzc1Z7p6Yt6M9q/B2/tBY4B2aAYustjUuA6pvKs6Wk+n9KjObg0tLezVtLieza2gqOTLrL 3tY3N1q1 ar7yXuOJLiZTCG5NQLgnk3H1O+CtOwwHb8OGynS17RRMl8vQKWupbcmLMwB2tKqlV+3Qjci8N8hVOFFrWs1DlyWdn1yxsqr2qdryNxtpPaPa1ElHB2PYK0XuYem5OXx/wXp7wAg1tK0oe3c/Ef4o129X/oP3tBitOnLqfJDhEWzZMFfMkQMI0k4Kmy5r+HlCwe/si/ARQ+SZTxtXor4EvlFDR4vY/euqW7bHiWqamHUOFqnxcsqdoKOVt7+qsEhIRrnJAnsQUUUVt2RQrpnyyTe6LmUROYhlXX/V9aRrNF2JamWbuOWWWdIpXV6gJZafzDvaz3vtgyaOIdSyzB4WCOCe/huOa09AGVMiUoVVgraCph4SUZXTXUP3BpGzvXWtlVMUluYnLgKC+WiRuavp2+9f3CHG+c85DlKWuCavb+9+i1kqCbP7ULact5mNNCPSqVp+c5wlmwdJGF3rvxIfdaGzi5Ur1RWnDxcExOhK8b3t/mn0dnhYG+VKnKX3pvvlWaO/Z X-Bogosity: Ham, tests=bogofilter, spamicity=0.000390, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: From: Jeff Xu This is followup patch on discussion happened during mseal v10 discussion [1] Add branch perdiction hint to mseal code. Please apply on top of mseal v10 patch (which already in mm-unstable) [1] https://lore.kernel.org/lkml/CAJuCfpFLwJg4n7wPpT+u9vC4XHoLE_BPPZ0tDKf7W45hGky4_Q@mail.gmail.com/T/#m20917ddbc4f817ebeb99276108b1f3ceffacb5c1 Thanks! -Jeff Jeff Xu (1): mseal: Add branch prediction hint. mm/madvise.c | 2 +- mm/mmap.c | 4 ++-- mm/mprotect.c | 2 +- mm/mremap.c | 4 ++-- mm/mseal.c | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-)