Received: by 2002:ab2:7a55:0:b0:1f4:4a7d:290d with SMTP id u21csp207535lqp; Thu, 4 Apr 2024 10:44:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXjv9K6naESz9YQqyEMNPbaxngruBlCxlF1wY6R2sv0bG+tRmIk7ggtHGqOnkeP1vTOgGLoAfxxtNIiwqMtKFHM9/F2jWpIWF31whcGUw== X-Google-Smtp-Source: AGHT+IEgbAyGccfbvIraIAhmdsxK7exNJ6vcOKQdFwgYRDtPLOSVFSUSCZlGDuxb/k+vbbtkaTX4 X-Received: by 2002:a5b:d03:0:b0:dcd:ef35:91d5 with SMTP id y3-20020a5b0d03000000b00dcdef3591d5mr3266716ybp.2.1712252686898; Thu, 04 Apr 2024 10:44:46 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712252686; cv=pass; d=google.com; s=arc-20160816; b=LrdApVWvnDJ0YbDvDYP5PnD1kOV8E0AAXOVhOoaJ/KdDY+Nmw+XmdvZWjPB6PUUq8V Eb7czYlan6kQyfM2mlwkZiSz0iKtFM+dkVatGuTSxlG61YZNteSbpr7MCh7h1euxxn+7 /Os4I7jLOpU+AXi19oyRhrY5Uamp7lrGqbusqFea6sj6BKMC8ITIRJfUuc5dSr9e2tRO GERX61W+JjL7WsXVVQWw0jEixAYvLWE2ZuM2EvSC2wh0AthpvVVympR5sfiUltrKV5gT kxlXcNddAlLT86088nQ6UtYA0bCtxVMEjoW1ELnqvkC4Tdd/EQHtrp93zh6dLL+JDVZa uGKQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=M88VuRkfKMVZscqFvkjFz3QDb0lbfRFNBp4u3AbPwH4=; fh=k+oeB3KeSrmD+JuB6y0IX30jWnIB/dTofYQ7xc24Wd0=; b=i8BOR6hS0ok19um33G6jS1z4+JGEBgdAlnc0TWI7x0hL4c3dJ0IYkvKTlUU2kmEKjS XBenodcYw0zyEtTIrgoF+tgB3OuhqJj8RkVv7V82/zVmX5jBnE4yY6nddbfpvpzRdMOU oXBhdzkqKue7OBtmHQXaDWqzO5z3Y7XbiJR2SCstSTb0WUmTadjTXBsWoZrkG6Ka66+k GGyEGaYwzDXTEhctoLuNbk2lHBGmCxiLSs/BJ+efs0kq+t4KbytWzgCsAjKn5aOEiX71 ayKt+tXtUsj2QNs2W4cT5AMn01YmrYqoKYpvipEvJlALEH79uzC/gPxfXAamY6EXTO+f +4dg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bBQ85kwM; 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-131902-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131902-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. [147.75.199.223]) by mx.google.com with ESMTPS id d6-20020ac85d86000000b00432b42b7842si16612457qtx.562.2024.04.04.10.44.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 10:44:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131902-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=bBQ85kwM; 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-131902-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131902-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 6BF711C26F06 for ; Thu, 4 Apr 2024 17:44:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5590A12E1C7; Thu, 4 Apr 2024 17:44:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="bBQ85kwM" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 BD1E81DFCE for ; Thu, 4 Apr 2024 17:44:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712252680; cv=none; b=s7n6ut4HfV7TsaCrCChWwiltkGL2UhYLIWzv7vB13KX85/bjdHlQHe1k891qPnNVEF37NrMOOWTiEx9UBmMhAGpcXBcC6XUrvDHJMKfmBOM9fERKDrb+gnGEmfeoe+Nb2nXkGG66wdKgpjqV21byfBh7ga8731lrgnTJ1VFuS3I= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712252680; c=relaxed/simple; bh=E8EvdLcWecli+qPyH79beE6yGJ/2t1vYm5PqxsJ7xIc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=uhfMe0+X6U2dqmW6aS0MF8z3NVdbYvbuFGI52DdQ+sQoAwW6/QW6q+q3s+aIvhmwnqsS1UEegAGemn0m4DycHlzo7FWlzbpGuWd65qnlU8Cy/QB01fmT7oYLzj1iPgpXbF8BHzzwp/5AaGwlkrWPmdryfimDydBE9Et22YeD45c= 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=bBQ85kwM; arc=none smtp.client-ip=170.10.133.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=1712252677; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=M88VuRkfKMVZscqFvkjFz3QDb0lbfRFNBp4u3AbPwH4=; b=bBQ85kwMRvgDZRtJvIl0uFVbY2dySw33hNJPI42178ZNOrs7qBrmEnjfChddSJqyaIBLY8 6zVu4ao7x4rUBtC1Vl3Kt40MfxhaB7SQgrEGjKddEVd+oLaA0vAJsiGy5/kWM0L+APF2Qn TXs1mYL0uQ2RmXVqTRMaEmWjTbRnv38= 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-248-_vwPB5A-N0mIMDkdcIynVw-1; Thu, 04 Apr 2024 13:44:34 -0400 X-MC-Unique: _vwPB5A-N0mIMDkdcIynVw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (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 17ECC88D12A; Thu, 4 Apr 2024 17:44:34 +0000 (UTC) Received: from [10.22.33.193] (unknown [10.22.33.193]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9AF751121306; Thu, 4 Apr 2024 17:44:33 +0000 (UTC) Message-ID: <23fd78bb-76a7-46e8-9523-5d2cab4186f5@redhat.com> Date: Thu, 4 Apr 2024 13:44:33 -0400 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/2] Make reader optimistic spinning optional Content-Language: en-US To: Bongkyu Kim , John Stultz Cc: peterz@infradead.org, mingo@redhat.com, will@kernel.org, boqun.feng@gmail.com, linux-kernel@vger.kernel.org, gregkh@linuxfoundation.org References: <20230901010704.18493-1-bongkyu7.kim@samsung.com> <20240403012132.GA460@KORCO045595.samsungds.net> <20240403014207.GA499@KORCO045595.samsungds.net> From: Waiman Long In-Reply-To: <20240403014207.GA499@KORCO045595.samsungds.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 On 4/2/24 21:42, Bongkyu Kim wrote: > On Tue, Apr 02, 2024 at 06:27:40PM -0700, John Stultz wrote: >> On Tue, Apr 2, 2024 at 6:21 PM Bongkyu Kim wrote: >>> On Tue, Apr 02, 2024 at 04:46:06PM -0700, John Stultz wrote: >>>> On Thu, Aug 31, 2023 at 6:07 PM Bongkyu Kim wrote: >>>>> This is rework of the following discussed patch. >>>>> https://lore.kernel.org/all/20230613043308.GA1027@KORCO045595.samsungds.net/ >>>>> >>>>> Changes from the previous patch >>>>> - Split to revert and modify patches >>>>> - Change according to Waiman Long's review >>>>> More wording to documentation part >>>>> Change module_param to early_param >>>>> Code change by Waiman Long's suggestion >>>>> >>>>> In mobile environment, reader optimistic spinning is still useful >>>>> because there're not many readers. In my test result at android device, >>>>> it improves application startup time about 3.8% >>>>> App startup time is most important factor for android user expriences. >>>>> So, re-enable reader optimistic spinning by this commit. And, >>>>> make it optional feature by cmdline. >>>>> >>>>> Test result: >>>>> This is 15 application startup performance in our exynos soc. >>>>> - Cortex A78*2 + Cortex A55*6 >>>>> - unit: ms (lower is better) >>>>> >>>>> Application base opt_rspin Diff Diff(%) >>>>> -------------------- ------ --------- ---- ------- >>>>> * Total(geomean) 343 330 -13 +3.8% >>>>> -------------------- ------ --------- ---- ------- >>>>> helloworld 110 108 -2 +1.8% >>>>> Amazon_Seller 397 388 -9 +2.3% >>>>> Whatsapp 311 304 -7 +2.3% >>>>> Simple_PDF_Reader 500 463 -37 +7.4% >>>>> FaceApp 330 317 -13 +3.9% >>>>> Timestamp_Camera_Free 451 443 -8 +1.8% >>>>> Kindle 629 597 -32 +5.1% >>>>> Coinbase 243 233 -10 +4.1% >>>>> Firefox 425 399 -26 +6.1% >>>>> Candy_Crush_Soda 552 538 -14 +2.5% >>>>> Hill_Climb_Racing 245 230 -15 +6.1% >>>>> Call_Recorder 437 426 -11 +2.5% >>>>> Color_Fill_3D 190 180 -10 +5.3% >>>>> eToro 512 505 -7 +1.4% >>>>> GroupMe 281 266 -15 +5.3% >>>>> >>>> Hey Bongkyu, >>>> I wanted to reach out to see what the current status of this patch >>>> set? I'm seeing other parties trying to work around the loss of the >>>> optimistic spinning functionality since commit 617f3ef95177 >>>> ("locking/rwsem: Remove reader optimistic spinning") as well, with >>>> their own custom variants (providing some substantial gains), and >>>> would really like to have a common solution. >>>> >>> I didn't get an reply, so I've been waiting. >>> Could you let me know about their patch? >> I don't have insight/access to any other implementations, but I have >> nudged folks to test your patch and chime in here. >> >> Mostly I just wanted to share that others are also seeing performance >> trouble from the loss of optimistic spinning, so it would be good to >> get some sort of shared solution upstream. >> >> thanks >> -john >> When this patch series was originally posted last year, we gave some comments and suggestion on how to improve it as well as request for more information on certain area. We were expecting a v2 with the suggested changes, but we never got one and so it just fell off the cliff. Please send a v2 with the requested change and we can continue our discussion. Thanks, Longman