Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

demo with hack #632

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

demo with hack #632

wants to merge 17 commits into from

Commits on Oct 8, 2024

  1. uadk: make hw sw co-work

    Using uadk_adapter_worker to record driver and resources.
    so adding multi driver is adding workers.
    
    struct uadk_adapter_worker {
    	struct wd_alg_driver *driver;
    	struct wd_ctx_config *ctx_config;
    	struct wd_sched *sched;
    	struct wd_ctx_config_internal config;
    	struct wd_async_msg_pool pool;
    	bool valid;
    };
    struct uadk_adapter {
    	unsigned int workers_nb;
    	enum uadk_adapter_mode mode;
    	struct uadk_adapter_worker workers[UADK_MAX_NB_WORKERS];
    	struct uadk_adapter_ops ops;
    };
    
    struct wd_digest_setting {
    	struct uadk_adapter *adapter;
    }
    struct wd_digest_sess {
            struct uadk_adapter_worker *worker;
            pthread_spinlock_t worker_lock;
    }
    
    Test
    
    sync
    uadk_tool benchmark --alg sha512 --mode sva --opt 0 --sync --pktlen 1024 --seconds 1 --thread 1 --multi 1 --ctxnum 1 --init 2
    algname:        length:         perf:           iops:           CPU_rate:
    sha512          1024Bytes       461461.00KiB/s  461.5Kops       100.00%
    
    async
    uadk_tool benchmark --alg sha512 --mode sva --opt 0 --async --pktlen 1024 --seconds 1 --thread 1 --multi 1 --ctxnum 1 --init 2
    algname:        length:         perf:           iops:           CPU_rate:
    sha512          1024Bytes       1938160.00KiB/s 1938.2Kops      191.00%
    
    sudo numactl --cpubind=0 --membind=0 \
    uadk_tool benchmark --alg sha512 --mode sva --opt 0 --async --pktlen 8192 --seconds 20 --multi 1 --thread 8 --ctxnum 8 --init 2
    
    algname:        length:         perf:           iops:           CPU_rate:
    sha512          8192Bytes       3453520.00KiB/s 431.7Kops       1387.60%
    
    init1:
    sudo numactl --cpubind=0 --membind=0 \
    uadk_tool benchmark --alg sha512 --mode sva --opt 0 --async --pktlen 8192 --seconds 20 --multi 1 --thread 8 --ctxnum 8
    algname:        length:         perf:           iops:           CPU_rate:
    sha512          8192Bytes       11269440.80KiB/s        1408.7Kops      1036.70%
    
    Signed-off-by: Zhangfei Gao <[email protected]>
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    f52e518 View commit details
    Browse the repository at this point in the history
  2. add adatper.c

    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    5bd6fa6 View commit details
    Browse the repository at this point in the history
  3. digest use sw and hw

    case 1: sync or async error, switch worker
    case 2: roundrobin mode, switch worker 10 times
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    68e6cb7 View commit details
    Browse the repository at this point in the history
  4. comp use sw and hw

        case 1: sync or async error, switch worker
        case 2: roundrobin mode, switch worker 10 times
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    526de09 View commit details
    Browse the repository at this point in the history
  5. Adding zlib drv to simulate cpu instruction driver

    Add zlib drv to to simulate cpu instruction accelerator
    
    Btw, zlib is required.
    apt-get install zlib1g-dev
    
    Signed-off-by: Zhangfei Gao <[email protected]>
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    ef3bfe2 View commit details
    Browse the repository at this point in the history
  6. uadk/alg: let UADK_ALG_SOFT register to uadk

    Will use hisi_zlib to test adapter, so let UADK_ALG_SOFT register to uadk
    
    Signed-off-by: Zhangfei Gao <[email protected]>
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    76c896b View commit details
    Browse the repository at this point in the history
  7. comp: test roundrobin

    will switch between zlib and zip
    
    uadk_tool benchmark --alg zlib --mode sva --opt 0 --sync --pktlen 1024 --seconds 1 --thread 1 --multi 1 --ctxnum 1 --init 2
    
    Signed-off-by: Zhangfei Gao <[email protected]>
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    ba0093b View commit details
    Browse the repository at this point in the history
  8. adapter: parse UADK_ENV

    export UADK_CONF=/home/linaro/work/uadk/uadk.conf
    
    Example: uadk.conf
    mode=1
    driver_name=hisi_zip
    driver_name=hisi_zlib
    
    If env UADK_CONF exist, only parse UADK_CONF and
    add to adapter->workers[] one by one.
    So the first driver has higher priority
    
    Signed-off-by: Zhangfei Gao <[email protected]>
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    ecbb3de View commit details
    Browse the repository at this point in the history
  9. fix adapter parse env

    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    4f7d86f View commit details
    Browse the repository at this point in the history
  10. util: hw sched use SCHED_POLICY_RR instead of para

    all workers need to be initialized in init2, using default type
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    fa47cb5 View commit details
    Browse the repository at this point in the history
  11. adapter: use sess worker lifetime

    worker->xxx is common, use sess worker lifetime instead
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    d29c6c4 View commit details
    Browse the repository at this point in the history
  12. sched_key is different according to workers

    init sched_key[] for each workers since they may different
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    b9bd1ce View commit details
    Browse the repository at this point in the history
  13. digest: clear >worker_lifetime when switch worker

    miss sess->worker_lifetime = 0 when switch worker, compute again
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    be773be View commit details
    Browse the repository at this point in the history
  14. Revert "comp: test roundrobin"

    mode=1 pass in from uadk.conf
    export UADK_CONF=/home/linaro/work/uadk/uadk.conf
    
    This reverts commit 45c62bb.
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    0f5e194 View commit details
    Browse the repository at this point in the history
  15. wd_cipher: cipher add adapter

    Signed-off-by: Zhangfei Gao <[email protected]>
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    9c056b5 View commit details
    Browse the repository at this point in the history
  16. adapter: sort workers as priority if no UADK_CONF

    if UADK_CONF, worker sequence is decided by UADK_CONF
    otherwise, workers is listed as drv->priority
    
    Signed-off-by: Zhangfei Gao <[email protected]>
    zhangfeigao committed Oct 8, 2024
    Configuration menu
    Copy the full SHA
    b6cf3b1 View commit details
    Browse the repository at this point in the history

Commits on Oct 9, 2024

  1. Configuration menu
    Copy the full SHA
    6299c10 View commit details
    Browse the repository at this point in the history