All of lore.kernel.org
 help / color / mirror / Atom feed
From: Keyon Jie <yang.jie@linux.intel.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	"Rajwa, Marcin" <marcin.rajwa@linux.intel.com>,
	"Jie, Yang" <yang.jie@intel.com>, Takashi Iwai <tiwai@suse.de>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>
Subject: Re: [alsa-devel] [PATCH] ALSA: pcm: fix buffer_bytes max constrained by preallocated bytes issue
Date: Fri, 17 Jan 2020 13:37:16 +0800	[thread overview]
Message-ID: <3374dc7d-e969-5380-581a-f6801a2fe50f@linux.intel.com> (raw)
In-Reply-To: <b6b55180-b846-96e7-4521-7d3b03881d06@linux.intel.com>

On 2020/1/17 上午1:40, Pierre-Louis Bossart wrote:
> 
>>>>> So, do you suggest not doing preallocation(or calling it with 0 
>>>>> size) for all
>>>>> driver with TYPE_SG? I am fine if this is the recommended method, I 
>>>>> can try
>>>>> this on SOF I2S platform to see if it can work as we required for 
>>>>> very large
>>>>> buffer size.
>>>
>>> Keyon, for the rest of us to follow this patch, would you mind 
>>> clarifying what drives the need for a 'very large buffer size', and 
>>> what order of magnitude this very large size would be.
>>>
>>> FWIW, we've measured consistently on different Windows/Linux 
>>> platforms, maybe 10 years ago, that once you reach a buffer of 1s 
>>> (384 kB) the benefits from increasing that buffer size further are 
>>> marginal in terms of power consumption, and generate all kinds of 
>>> issues with volume updates and deferred routing changes.
>>>
>> We need bigger buffer on host side to compensate the wake up time from 
>> d0ix to d0 which takes ~2 seconds on my setup. So, wiith smaller 
>> buffer sizes like < 2 seconds we overwrite data since FW keeps copping 
>> while host doesn't read until its up and running again.
> 
> Right, that's a valid case, but that's 256 kB, not 'very large' or 
> likely to ever trigger an OOM case.

For S24_LE, it is 512KB, the point is that if we can't re-allocate 
buffer at hw_params() stage, then we need follow a BKM that we have to 
preallocate the largest DMA buffer that we claim to support at 
pcm_new(), I think this is actually another kind of wast with these 
largest pinned buffer that can't be swapped out...

Thanks,
~Keyon

> _______________________________________________
> Alsa-devel mailing list
> Alsa-devel@alsa-project.org
> https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
https://mailman.alsa-project.org/mailman/listinfo/alsa-devel

  parent reply	other threads:[~2020-01-17  5:37 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-16  4:53 [alsa-devel] [PATCH] ALSA: pcm: fix buffer_bytes max constrained by preallocated bytes issue Keyon Jie
2020-01-16  7:15 ` Takashi Iwai
2020-01-16  9:50   ` Keyon Jie
2020-01-16 10:27     ` Takashi Iwai
2020-01-16 11:25       ` Keyon Jie
2020-01-16 11:50         ` Takashi Iwai
2020-01-16 14:14           ` Jie, Yang
2020-01-16 15:31             ` Jie, Yang
2020-01-16 16:07               ` Takashi Iwai
2020-01-16 16:39               ` Pierre-Louis Bossart
2020-01-16 17:25                 ` Rajwa, Marcin
2020-01-16 17:40                   ` Pierre-Louis Bossart
2020-01-16 20:37                     ` Takashi Iwai
2020-01-17  5:30                       ` Keyon Jie
2020-01-17  7:57                         ` Takashi Iwai
2020-01-17 10:13                           ` Keyon Jie
2020-01-17 10:30                             ` Takashi Iwai
2020-01-17 10:56                               ` Keyon Jie
2020-01-17 11:15                                 ` Takashi Iwai
2020-01-17  5:37                     ` Keyon Jie [this message]
2020-01-17  8:00                       ` Takashi Iwai
2020-01-17 10:43                         ` Keyon Jie
2020-01-17 11:12                           ` Takashi Iwai
2020-01-19  3:52                             ` Keyon Jie
2020-01-19  7:09                               ` Takashi Iwai
2020-01-19  8:11                                 ` Keyon Jie
2020-01-19  9:04                                   ` Takashi Iwai
2020-01-19 10:14                                     ` Keyon Jie
2020-01-19 10:43                                       ` Takashi Iwai
2020-01-20  2:23                                         ` Keyon Jie
2020-01-16 15:45             ` Takashi Iwai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3374dc7d-e969-5380-581a-f6801a2fe50f@linux.intel.com \
    --to=yang.jie@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=marcin.rajwa@linux.intel.com \
    --cc=pierre-louis.bossart@linux.intel.com \
    --cc=tiwai@suse.de \
    --cc=yang.jie@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.