Received: by 2002:ab2:6d45:0:b0:1fb:d597:ff75 with SMTP id d5csp309174lqr; Wed, 5 Jun 2024 06:52:27 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVY72BCsvmikz09hxTG1E8PMofflO/XkUeszypQERp6qalNP+EBN3ASYlJeyWVv3wY0uZod3fS31IyLuDsmvVyEIgQaJVPN5jHMyhAovQ== X-Google-Smtp-Source: AGHT+IEd4hynGcprFF+jo14D5nlUe10lBlMD8FegAhWo7hn/Ghl6YiUJ09srRxZeI+o6nQytOLmR X-Received: by 2002:a05:620a:2444:b0:792:ba14:28cc with SMTP id af79cd13be357-79522fa4c00mr515394485a.1.1717595546869; Wed, 05 Jun 2024 06:52:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717595546; cv=pass; d=google.com; s=arc-20160816; b=icTVdWvYc8ezt5i+hJy9QnlPsGP6gad3XZZxUrBJHHVpm9ZbzYz67jMofjojXR403X d7ddYAG4n+ikFjyexA3+HrOoVWAm3ZmJc7zhys2STEEudehkm+5bgsbHa9Ac5z4XfWPE Y7ZBG9HBQ03eVHwgryQ/cPzifiFaWp4Hmmlzp1iIhSiHy+XfgXYCpmrTyEFe1sHAXSSe LJBZ1nK1qY7QScpW40lWxe759Nev+R5Wz2MAU7v0WbAEhKyzZohuioBO0Yo2HphuKyFk wzxDPVaYvqBnkROb6xGdnn4SzzVy+g61aHN+YVwUkO31z4kOeljuWyaVXjcvdl4+L51t jK6g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:references :message-id:subject:cc:to:from:date:dkim-signature; bh=8Hq5dFgzzvJ7XxAlZCAf3SVqsfwdgE9gzlqrR94U8+M=; fh=+R7NYsGdpFdHR4Eu/mAiAlfKAXZdiIbSIzwiWMQialY=; b=vQeugb87yEGvzci3tdeWpipsQFsIbHKd6PGJicFd9KUbHFlaA1WiqAUA7n+ycRycMo dafoTyzJgD0YkUKSUP8motj+RjwGngJgjGHGsWupUjHX9bu/WKKryIyzisFbxmjGRmm9 foZBGqK0dQ62SSiwk+4A5Sg8Hcvb1bCwvkfE+c9VA/x/5zxfRl0EfWY4Hqb1YAjI0AHE p15YraY4n8bspm2eUrBBN7AL5AL7WFQQHt1bPK4b863tyN8Me1QnIV+uYaL+I4WcAaBe 68dPK6MN5Dpb98vtC5j8q5b462audI2YVfORctPUGOHLHeALgIF12p4p0OuU/3OdzPpX 0QMQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FlfAMr8Q; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-202728-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794f2f04e98si49199985a.56.2024.06.05.06.52.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 05 Jun 2024 06:52:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-202728-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=FlfAMr8Q; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-202728-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-202728-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 968461C244EC for ; Wed, 5 Jun 2024 13:52:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A546A195394; Wed, 5 Jun 2024 13:39:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="FlfAMr8Q" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 7C8B118F2CD for ; Wed, 5 Jun 2024 13:39:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717594788; cv=none; b=jIsBhyLLMAtKvaj3/Y9pmlvhfB7cV0TbDrzr2Z2Koiao3GsvcN8hS0q1yTgoX73lwA6Uv7WP/vEXRwTnpeZ+aF6BvdEPgCvRR5Sxv4n9Ke8Ye/VsX6BT979dwA0NM20jbamzuDaM5i4Rr2zdm6/pvz755QPp2uRXvOgULmSKSnA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717594788; c=relaxed/simple; bh=KXUlGvJxH76Dw1mprNtT8VriPC1GoqJaANXsGiwAP1M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Ll5kb9SFdeoaQbrpxXTEzNsBJv9iyjb4PbsEZRHzilYM4z9cLHP+WivYgWlhi4ZIYMPun/LoXVJzw2SbvrDnmMO6GC0gtr/7f1fdsOUk3lJ1aduCdO5eoex5eXVXrnPe6xdUjf5nBQAdUlluqWVWFdt+flIDmjv77NDOJOmvDJs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=FlfAMr8Q; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1717594786; h=from:from:reply-to:subject:subject: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=8Hq5dFgzzvJ7XxAlZCAf3SVqsfwdgE9gzlqrR94U8+M=; b=FlfAMr8Qr9Pvjh9xqvrGra1fID1ZgM1ezrNuLdx/CuEJx3+oJJwWWdhCRS6bsbF2tPWZN7 LbUVfZkyBUqbH0qbByM+qCmKF38/tJhcZLuLWnMcj3GAkLamhvhgemsffqe7SP0/SUF5/X vLP5w4kMyGGt1RNRc/nu2BQBp0SIOXA= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-651-TesUs7_COgSJTGxJHerPAQ-1; Wed, 05 Jun 2024 09:39:39 -0400 X-MC-Unique: TesUs7_COgSJTGxJHerPAQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3E8AC800076; Wed, 5 Jun 2024 13:39:38 +0000 (UTC) Received: from dhcp-27-174.brq.redhat.com (unknown [10.45.224.50]) by smtp.corp.redhat.com (Postfix) with SMTP id 5D8C31C0005E; Wed, 5 Jun 2024 13:39:35 +0000 (UTC) Received: by dhcp-27-174.brq.redhat.com (nbSMTP-1.00) for uid 1000 oleg@redhat.com; Wed, 5 Jun 2024 15:38:09 +0200 (CEST) Date: Wed, 5 Jun 2024 15:38:05 +0200 From: Oleg Nesterov To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Andy Lutomirski , Andrew Morton , Dave Hansen , Peter Zijlstra , Borislav Petkov , "H . Peter Anvin" , Linus Torvalds , Thomas Gleixner , Uros Bizjak Subject: Re: [PATCH 2/3] x86/fpu: Remove the thread::fpu pointer Message-ID: <20240605133805.GB25006@redhat.com> References: <20240605083557.2051480-1-mingo@kernel.org> <20240605083557.2051480-3-mingo@kernel.org> 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: <20240605083557.2051480-3-mingo@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 On 06/05, Ingo Molnar wrote: > > @@ -591,13 +591,11 @@ int fpu_clone(struct task_struct *dst, unsigned long clone_flags, bool minimal, > * This is safe because task_struct size is a multiple of cacheline size. > */ > struct fpu *dst_fpu = (void *)dst + sizeof(*dst); > - struct fpu *src_fpu = current->thread.fpu; > + struct fpu *src_fpu = x86_task_fpu(current); I think this patch can also change struct fpu *dst_fpu = (void *)dst + sizeof(*dst); above to use x86_task_fpu(dst). Oleg.