Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp748168rwp; Wed, 12 Jul 2023 23:42:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlHBfnArCg+qDTh2AtalMPzdatIE+7UMAVbCfQ9Cr14B264VB5eXWZmDk4CvYiux2qFjlk9d X-Received: by 2002:aa7:d8d4:0:b0:51d:a4fa:c62c with SMTP id k20-20020aa7d8d4000000b0051da4fac62cmr1661251eds.0.1689230558412; Wed, 12 Jul 2023 23:42:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689230558; cv=none; d=google.com; s=arc-20160816; b=nCmRFtU/X89UlcjrkQ22ldOA29j2vgOS2erlw8JLoloT/wn+pmiZpDzK9yISRuIOjl WLFM9S+ne6l9zIyiMvH3L+NnPMKaeLENZokudnFgOpfoNp7cnP94dOLWXgc9Q7xjC+GU uBhp4IQ2dZB2JvoS4yE0TW3C/q3Ee6MsU9YgV8NEqp+JGy0ZXz3KLTITJSxPTwAHnC2w 0uRpYRfdGniMmLPTAite0s6K8Wf5Qh+hcq3EGg1fvIK0VdY82gGsoud8v+wY9a7D+/2t ygUfAWERoSzkyMCKzB0z605GyiyH3r34VPX66QOvC145fEEiMyGwvenCCnJ3ogb8cVBH C5xQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=k3MojbVcIgPhkMJWXOyivxSHkZorYQbjQcXYbfJta8g=; fh=S4URyNAad87Yxi2/a+HeVWcF+2cFa+H0Sd7mMFfPnYk=; b=jikkNj2CYUFX6zt7/elOAIsLdHqV145SVSExU5UDjp/fEJ26SdHN38AfBx8yGg1Q5a PgNUg9akT94lSOWXqcfvi7aCAOLvZCzoh6uehOV2xq9686nBtDPA4NTYaBk9dSyW5wZ2 I7zEi9B6AziwCaaP2XVBfL/1XEhbRfv48wi8KWau8iqfhBizEDcTgKrey8d+FaleCcWf FmsvLpkflLvF0K51Az/rKhyGqGo9nZB6utxHZCUfRLu5PKRBdElm48LvhT16FFIdmijB sXmsXcEjhUFY7mYvs9LbLxx7/n+O7djkYA8gG6ibo8WJpYXTsh44UX6mvVtbXMXjOck+ EESQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Ho5EUXl2; dkim=neutral (no key) header.i=@suse.de header.b=Tfa6rZRN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i11-20020a50fc0b000000b0051bec40640bsi6495473edr.603.2023.07.12.23.42.14; Wed, 12 Jul 2023 23:42:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=Ho5EUXl2; dkim=neutral (no key) header.i=@suse.de header.b=Tfa6rZRN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S234024AbjGMGDb (ORCPT + 99 others); Thu, 13 Jul 2023 02:03:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233845AbjGMGD2 (ORCPT ); Thu, 13 Jul 2023 02:03:28 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0D19A213E for ; Wed, 12 Jul 2023 23:03:02 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 721B022205; Thu, 13 Jul 2023 06:03:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1689228181; h=from:from: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=k3MojbVcIgPhkMJWXOyivxSHkZorYQbjQcXYbfJta8g=; b=Ho5EUXl2R3gG/HOkYXyqUGmQjoY1p0jAzF/fpFtckClR80sCTgn4Kh5//vjD2kQNCl06h/ tVKjsG9YFXOi/NJoaBxQ9g3IXUviCqtMmNPqsbFeepZ7NCroF8xusCLpamSm9/P6eWxXfV AjvLDRyDtUdqnBxf4zWqfsYYqErp/bg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1689228181; h=from:from: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=k3MojbVcIgPhkMJWXOyivxSHkZorYQbjQcXYbfJta8g=; b=Tfa6rZRNnuHp0qkjzkTIE5snNcjsz1XUc13wtk9ZTSSEb9bJC9/zIpLo+XdQ6qi7vkXqDf xfoHbtRXgtZ1NVBw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 40B48138ED; Thu, 13 Jul 2023 06:03:01 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id KwXTDpWTr2QFNwAAMHmgww (envelope-from ); Thu, 13 Jul 2023 06:03:01 +0000 Date: Thu, 13 Jul 2023 08:03:00 +0200 Message-ID: <87351sgxgr.wl-tiwai@suse.de> From: Takashi Iwai To: Ivan Orlov Cc: perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: pcmtest: Extend error injection, decrease buffer filling overhead In-Reply-To: <20230712191325.8791-1-ivan.orlov0322@gmail.com> References: <20230712191325.8791-1-ivan.orlov0322@gmail.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 12 Jul 2023 21:13:25 +0200, Ivan Orlov wrote: > > Extend 'pcmtest' virtual driver with 'open' callback error injection > functionality, as it already can inject errors into other PCM callbacks. > > Fix the driver to use already defined variables where it is possible. > > Additionally, decrease the buffer filling overhead with conditional > reminder calculation in the 'inc_buf_pos' inline function. > > Signed-off-by: Ivan Orlov Please avoid mixing different changes in a single patch. This patch does three completely different things, and they should be split. - New inject_open_err parameter - Optimization of inc_buf_pos() - Optimization of check_buf_block_ni() and fill_block_pattern_n() The latter two could be put in a single patch as minor optimizations, but the introduction of a new option doesn't fit with the rest. thanks, Takashi